mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -20,6 +20,7 @@ class Region;
|
||||
class VMObject;
|
||||
class Zone;
|
||||
class WSWindow;
|
||||
class GraphicsBitmap;
|
||||
|
||||
#define COOL_GLOBALS
|
||||
#ifdef COOL_GLOBALS
|
||||
@@ -197,9 +198,12 @@ public:
|
||||
int gui$create_window(const GUI_WindowParameters*);
|
||||
int gui$destroy_window(int window_id);
|
||||
int gui$get_window_backing_store(int window_id, GUI_WindowBackingStoreInfo*);
|
||||
int gui$release_window_backing_store(void* backing_store_id);
|
||||
int gui$invalidate_window(int window_id, const GUI_Rect*);
|
||||
int gui$get_window_parameters(int window_id, GUI_WindowParameters*);
|
||||
int gui$set_window_parameters(int window_id, const GUI_WindowParameters*);
|
||||
int gui$get_window_title(int window_id, char* buffer, size_t size);
|
||||
int gui$set_window_title(int window_id, const char* title, size_t size);
|
||||
int gui$get_window_rect(int window_id, GUI_Rect*);
|
||||
int gui$set_window_rect(int window_id, const GUI_Rect*);
|
||||
|
||||
DisplayInfo get_display_info();
|
||||
|
||||
@@ -360,6 +364,7 @@ private:
|
||||
RetainPtr<Region> m_display_framebuffer_region;
|
||||
|
||||
HashMap<int, OwnPtr<WSWindow>> m_windows;
|
||||
Vector<RetainPtr<GraphicsBitmap>> m_retained_backing_stores;
|
||||
|
||||
Vector<GUI_Event> m_gui_events;
|
||||
Lock m_gui_events_lock;
|
||||
|
||||
Reference in New Issue
Block a user