mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
Let userland retain the window backing store while drawing into it.
To start painting, call: gui$get_window_backing_store() Then finish up with: gui$release_window_backing_store() Process will retain the underlying GraphicsBitmap behind the scenes. This fixes racing between the WindowServer and GUI clients. This patch also adds a WSWindowLocker that is exactly what it sounds like.
This commit is contained in:
parent
ccf3fc4618
commit
86eae0f8df
22 changed files with 244 additions and 102 deletions
|
@ -40,8 +40,8 @@ public:
|
|||
void set_draw_op(DrawOp op) { m_draw_op = op; }
|
||||
DrawOp draw_op() const { return m_draw_op; }
|
||||
|
||||
void set_clip_rect(const Rect& rect) { m_clip_rect = rect; }
|
||||
void clear_clip_rect() { m_clip_rect = { 0, 0, 1024, 768 }; }
|
||||
void set_clip_rect(const Rect& rect);
|
||||
void clear_clip_rect();
|
||||
Rect clip_rect() const { return m_clip_rect; }
|
||||
|
||||
private:
|
||||
|
@ -53,6 +53,7 @@ private:
|
|||
RetainPtr<GraphicsBitmap> m_target;
|
||||
#ifdef LIBGUI
|
||||
GWindow* m_window { nullptr };
|
||||
void* m_backing_store_id { nullptr };
|
||||
#endif
|
||||
DrawOp m_draw_op { DrawOp::Copy };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue