mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27: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
|
@ -564,19 +564,19 @@ private:
|
|||
|
||||
class WSAPIInvalidateRectRequest final : public WSAPIClientRequest {
|
||||
public:
|
||||
explicit WSAPIInvalidateRectRequest(int client_id, int window_id, const Rect& rect)
|
||||
explicit WSAPIInvalidateRectRequest(int client_id, int window_id, const Vector<Rect, 32>& rects)
|
||||
: WSAPIClientRequest(WSEvent::APIInvalidateRectRequest, client_id)
|
||||
, m_window_id(window_id)
|
||||
, m_rect(rect)
|
||||
, m_rects(rects)
|
||||
{
|
||||
}
|
||||
|
||||
int window_id() const { return m_window_id; }
|
||||
Rect rect() const { return m_rect; }
|
||||
const Vector<Rect, 32>& rects() const { return m_rects; }
|
||||
|
||||
private:
|
||||
int m_window_id { 0 };
|
||||
Rect m_rect;
|
||||
Vector<Rect, 32> m_rects;
|
||||
};
|
||||
|
||||
class WSAPIGetWindowBackingStoreRequest final : public WSAPIClientRequest {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue