1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:47:35 +00:00

Make it possible to invalidate only a portion of a window.

Use this in Terminal to only invalidate rows where anything changed.
This commit is contained in:
Andreas Kling 2019-01-18 04:37:49 +01:00
parent 9d7da26b4e
commit dff70021ab
15 changed files with 91 additions and 15 deletions

View file

@ -25,6 +25,7 @@ private:
void set_cursor(unsigned row, unsigned column);
void put_character_at(unsigned row, unsigned column, byte ch);
void invalidate_cursor();
void invalidate_window(const Rect& = Rect());
void escape$A(const Vector<unsigned>&);
void escape$D(const Vector<unsigned>&);
@ -40,6 +41,7 @@ private:
word columns() const { return m_columns; }
word rows() const { return m_rows; }
Rect glyph_rect(word row, word column);
Rect row_rect(word row);
struct Attribute {
Attribute() { reset(); }
@ -58,6 +60,7 @@ private:
byte* m_buffer { nullptr };
Attribute* m_attributes { nullptr };
bool* m_row_needs_invalidation { nullptr };
word m_columns { 0 };
word m_rows { 0 };