1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

WindowServer: Avoid overdraw by shattering dirty rects into unique shards.

The algorithm I came up with is O(n^2) but given the small numbers of rects
we're typically working with, it doesn't really matter. May need to revisit
this in the future if we find ourselves with a huge number of rects.
This commit is contained in:
Andreas Kling 2019-02-19 14:49:23 +01:00
parent 420b7bd55f
commit 98784ad3cb
7 changed files with 127 additions and 21 deletions

View file

@ -170,6 +170,8 @@ public:
Point location() const { return m_location; }
Size size() const { return m_size; }
Vector<Rect> shatter(const Rect& hammer) const;
operator WSAPI_Rect() const;
bool operator==(const Rect& other) const