mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
WindowServer+LibGUI: Coalesce multiple client paints into GMultiPaintEvents.
This allows GWindow to paint up to 32 separate rects before telling the WindowServer to flip the buffers. Quite a bit smoother. :^)
This commit is contained in:
parent
7efd61fcf5
commit
7234900f61
6 changed files with 54 additions and 18 deletions
|
@ -14,6 +14,7 @@ public:
|
|||
Show = 1000,
|
||||
Hide,
|
||||
Paint,
|
||||
MultiPaint,
|
||||
Resize,
|
||||
MouseMove,
|
||||
MouseDown,
|
||||
|
@ -127,6 +128,23 @@ private:
|
|||
String m_icon_path;
|
||||
};
|
||||
|
||||
class GMultiPaintEvent final : public GEvent {
|
||||
public:
|
||||
explicit GMultiPaintEvent(const Vector<Rect, 32>& rects, const Size& window_size)
|
||||
: GEvent(GEvent::MultiPaint)
|
||||
, m_rects(rects)
|
||||
, m_window_size(window_size)
|
||||
{
|
||||
}
|
||||
|
||||
const Vector<Rect, 32>& rects() const { return m_rects; }
|
||||
Size window_size() const { return m_window_size; }
|
||||
|
||||
private:
|
||||
Vector<Rect, 32> m_rects;
|
||||
Size m_window_size;
|
||||
};
|
||||
|
||||
class GPaintEvent final : public GEvent {
|
||||
public:
|
||||
explicit GPaintEvent(const Rect& rect, const Size& window_size = Size())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue