mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
WindowSerer+LibGUI: Send multiple rects in invalidation/flush messages.
This patch moves to sending up to 32 rects at a time when coordinating the painting between WindowServer and its clients. Rects are also merged into a minimal DisjointRectSet on the server side before painting. Interactive resize looks a lot better after this change, since we can usually do all the repainting needed in one go.
This commit is contained in:
parent
ec365b82d5
commit
7efd61fcf5
10 changed files with 74 additions and 29 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <LibCore/CObject.h>
|
||||
#include <WindowServer/WSWindowType.h>
|
||||
#include <WindowServer/WSWindowFrame.h>
|
||||
#include <SharedGraphics/DisjointRectSet.h>
|
||||
|
||||
class WSClientConnection;
|
||||
class WSCursor;
|
||||
|
@ -127,6 +128,9 @@ public:
|
|||
const WSCursor* override_cursor() const { return m_override_cursor.ptr(); }
|
||||
void set_override_cursor(RetainPtr<WSCursor>&& cursor) { m_override_cursor = move(cursor); }
|
||||
|
||||
void request_update(const Rect&);
|
||||
DisjointRectSet take_pending_paint_rects() { return move(m_pending_paint_rects); }
|
||||
|
||||
// For InlineLinkedList.
|
||||
// FIXME: Maybe make a ListHashSet and then WSWindowManager can just use that.
|
||||
WSWindow* m_next { nullptr };
|
||||
|
@ -160,4 +164,5 @@ private:
|
|||
WSWindowFrame m_frame;
|
||||
Color m_background_color { Color::LightGray };
|
||||
unsigned m_wm_event_mask { 0 };
|
||||
DisjointRectSet m_pending_paint_rects;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue