mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
Terminal: Redraw entire line if any of its characters are dirty.
This means we only have to do one fill_rect() per line and the whole process ends up being ~10% faster than before. Also added a read_tsc() syscall to give userspace access to the TSC.
This commit is contained in:
parent
11b73c38d8
commit
267a903dd0
9 changed files with 108 additions and 35 deletions
|
@ -52,22 +52,22 @@ private:
|
|||
{
|
||||
foreground_color = 7;
|
||||
background_color = 0;
|
||||
bold = false;
|
||||
dirty = true;
|
||||
//bold = false;
|
||||
}
|
||||
unsigned foreground_color : 4;
|
||||
unsigned background_color : 4;
|
||||
bool bold : 1;
|
||||
bool dirty : 1;
|
||||
//bool bold : 1;
|
||||
};
|
||||
|
||||
struct Line {
|
||||
explicit Line(word columns);
|
||||
~Line();
|
||||
void clear();
|
||||
bool has_only_one_background_color() const;
|
||||
byte* characters { nullptr };
|
||||
Attribute* attributes { nullptr };
|
||||
bool needs_invalidation { false };
|
||||
bool dirty { false };
|
||||
word length { 0 };
|
||||
};
|
||||
Line& line(size_t index) { ASSERT(index < m_rows); return *m_lines[index]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue