mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
WindowServer: Cache rendered window frame in bitmap
This only renders the window frame once until the size of the window changes, or some other event requires re-rendering. It is rendered to a temporary bitmap, and then the top and bottom part is stored in one bitmap as well as the left and right part. This also adds an opacity setting, allowing it to be rendered with a different opacity. This makes it easier to enhance window themes and allows using arbitrary bitmaps with e.g. alpha channels for e.g. shadows.
This commit is contained in:
parent
8ff34f96b6
commit
15a1d9aa94
4 changed files with 138 additions and 10 deletions
|
@ -1515,7 +1515,9 @@ void WindowManager::reload_icon_bitmaps_after_scale_change(bool allow_hidpi_icon
|
|||
m_allow_hidpi_icons = allow_hidpi_icons;
|
||||
reload_config();
|
||||
for_each_window([&](Window& window) {
|
||||
window.frame().set_button_icons();
|
||||
auto& window_frame = window.frame();
|
||||
window_frame.set_button_icons();
|
||||
window_frame.scale_changed();
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue