mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27: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:
parent
5d1acdda82
commit
c7847d7c81
9 changed files with 72 additions and 10 deletions
|
@ -47,6 +47,9 @@ public:
|
|||
bool is_fullscreen() const { return m_fullscreen; }
|
||||
void set_fullscreen(bool);
|
||||
|
||||
bool is_occluded() const { return m_occluded; }
|
||||
void set_occluded(bool);
|
||||
|
||||
bool show_titlebar() const { return m_show_titlebar; }
|
||||
void set_show_titlebar(bool show) { m_show_titlebar = show; }
|
||||
|
||||
|
@ -72,7 +75,7 @@ public:
|
|||
void set_title(const String&);
|
||||
|
||||
float opacity() const { return m_opacity; }
|
||||
void set_opacity(float opacity) { m_opacity = opacity; }
|
||||
void set_opacity(float);
|
||||
|
||||
int x() const { return m_rect.x(); }
|
||||
int y() const { return m_rect.y(); }
|
||||
|
@ -193,6 +196,7 @@ private:
|
|||
bool m_minimized { false };
|
||||
bool m_maximized { false };
|
||||
bool m_fullscreen { false };
|
||||
bool m_occluded { false };
|
||||
bool m_show_titlebar { true };
|
||||
RefPtr<GraphicsBitmap> m_backing_store;
|
||||
RefPtr<GraphicsBitmap> m_last_backing_store;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue