1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 12:08:14 +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:
Andreas Kling 2019-04-20 17:19:56 +02:00
parent ec365b82d5
commit 7efd61fcf5
10 changed files with 74 additions and 29 deletions

View file

@ -109,8 +109,16 @@ struct WSAPI_ServerMessage {
};
Type type { Invalid };
int window_id { -1 };
int text_length { 0 };
char text[256];
union {
int text_length { 0 };
int rect_count;
};
union {
char text[512];
WSAPI_Rect rects[32];
};
int value { 0 };
union {
@ -134,7 +142,6 @@ struct WSAPI_ServerMessage {
WSAPI_Rect old_rect;
} window;
struct {
WSAPI_Rect rect;
WSAPI_Size window_size;
} paint;
struct {
@ -207,8 +214,14 @@ struct WSAPI_ClientMessage {
};
Type type { Invalid };
int window_id { -1 };
int text_length { 0 };
char text[256];
union {
int text_length { 0 };
int rect_count;
};
union {
char text[512];
WSAPI_Rect rects[32];
};
int value { 0 };
union {