1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

WindowServer+LibGUI: Mark window bitmaps volatile in occluded windows

WindowServer now tracks whether windows are occluded (meaning that
they are completely covered by one or more opaque windows sitting above
them.) This state is communicated to the windows via WindowStateChanged
messages, which then allow GWindow to mark its backing store volatile.

This reduces the effective memory impact of windows that are not at all
visible to the user. Very cool. :^)
This commit is contained in:
Andreas Kling 2019-12-27 11:34:40 +01:00
parent 5d1acdda82
commit c7847d7c81
9 changed files with 72 additions and 10 deletions

View file

@ -68,6 +68,8 @@ public:
void notify_title_changed(WSWindow&);
void notify_rect_changed(WSWindow&, const Rect& oldRect, const Rect& newRect);
void notify_minimization_state_changed(WSWindow&);
void notify_opacity_changed(WSWindow&);
void notify_occlusion_state_changed(WSWindow&);
void notify_client_changed_app_menubar(WSClientConnection&);
Rect maximized_window_rect(const WSWindow&) const;
@ -199,6 +201,8 @@ private:
void tell_wm_listener_about_window_rect(WSWindow& listener, WSWindow&);
void pick_new_active_window();
void recompute_occlusions();
RefPtr<WSCursor> m_arrow_cursor;
RefPtr<WSCursor> m_hand_cursor;
RefPtr<WSCursor> m_resize_horizontally_cursor;