1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +00:00

WindowServer: Fix caching stretched wallpaper for multiple screens

This creates a cached bitmap for each unique screen resolution, which
allows us to share it between displays with the same resolution. If
the resolution is the same as the wallpaper, we can just use the
wallpaper as-is.
This commit is contained in:
Tom 2023-02-17 20:57:08 -07:00 committed by Linus Groh
parent 5b77346f53
commit 15d4903efb
3 changed files with 33 additions and 15 deletions

View file

@ -40,7 +40,6 @@ struct CompositorScreenData {
OwnPtr<Gfx::Painter> m_back_painter;
OwnPtr<Gfx::Painter> m_front_painter;
OwnPtr<Gfx::Painter> m_temp_painter;
OwnPtr<Gfx::Painter> m_wallpaper_painter;
RefPtr<Gfx::Bitmap> m_cursor_back_bitmap;
OwnPtr<Gfx::Painter> m_cursor_back_painter;
Gfx::IntRect m_last_cursor_rect;
@ -62,7 +61,6 @@ struct CompositorScreenData {
void flip_buffers(Screen&);
void draw_cursor(Screen&, Gfx::IntRect const&);
bool restore_cursor_back(Screen&, Gfx::IntRect&);
void init_wallpaper_bitmap(Screen&);
void clear_wallpaper_bitmap();
template<typename F>