1
Fork 0
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:
Andreas Kling 2019-01-25 01:27:02 +01:00
parent e28de4ad5e
commit a4a106a430
3 changed files with 62 additions and 43 deletions

View file

@ -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 };