mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +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
|
@ -191,9 +191,14 @@ void WSEventLoop::on_receive_from_client(int client_id, const WSAPI_ClientMessag
|
|||
case WSAPI_ClientMessage::Type::GetClipboardContents:
|
||||
post_event(client, make<WSAPIGetClipboardContentsRequest>(client_id));
|
||||
break;
|
||||
case WSAPI_ClientMessage::Type::InvalidateRect:
|
||||
post_event(client, make<WSAPIInvalidateRectRequest>(client_id, message.window_id, message.window.rect));
|
||||
case WSAPI_ClientMessage::Type::InvalidateRect: {
|
||||
Vector<Rect, 32> rects;
|
||||
ASSERT(message.rect_count <= 32);
|
||||
for (int i = 0; i < message.rect_count; ++i)
|
||||
rects.append(message.rects[i]);
|
||||
post_event(client, make<WSAPIInvalidateRectRequest>(client_id, message.window_id, rects));
|
||||
break;
|
||||
}
|
||||
case WSAPI_ClientMessage::Type::DidFinishPainting:
|
||||
post_event(client, make<WSAPIDidFinishPaintingNotification>(client_id, message.window_id, message.window.rect));
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue