mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
Terminal: Use a more reasonable data structure for the emulation buffer.
This commit is contained in:
parent
e28de4ad5e
commit
a4a106a430
3 changed files with 62 additions and 43 deletions
|
@ -61,9 +61,18 @@ private:
|
|||
bool dirty : 1;
|
||||
};
|
||||
|
||||
byte* m_buffer { nullptr };
|
||||
Attribute* m_attributes { nullptr };
|
||||
bool* m_row_needs_invalidation { nullptr };
|
||||
struct Line {
|
||||
explicit Line(word columns);
|
||||
~Line();
|
||||
void clear();
|
||||
byte* characters { nullptr };
|
||||
Attribute* attributes { nullptr };
|
||||
bool needs_invalidation { false };
|
||||
word length { 0 };
|
||||
};
|
||||
Line& line(size_t index) { ASSERT(index < m_rows); return *m_lines[index]; }
|
||||
|
||||
Line** m_lines { nullptr };
|
||||
|
||||
word m_columns { 0 };
|
||||
word m_rows { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue