mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-10 10:36:30 +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:
@@ -84,7 +84,8 @@ void GEventLoop::handle_paint_event(const WSAPI_ServerMessage& event, GWindow& w
|
||||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("WID=%x Paint [%d,%d %dx%d]\n", event.window_id, event.paint.rect.location.x, event.paint.rect.location.y, event.paint.rect.size.width, event.paint.rect.size.height);
|
||||
#endif
|
||||
post_event(window, make<GPaintEvent>(event.paint.rect, event.paint.window_size));
|
||||
for (int i = 0; i < event.rect_count; ++i)
|
||||
post_event(window, make<GPaintEvent>(event.rects[i], event.paint.window_size));
|
||||
}
|
||||
|
||||
void GEventLoop::handle_resize_event(const WSAPI_ServerMessage& event, GWindow& window)
|
||||
|
||||
Reference in New Issue
Block a user