1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

WindowServer: Spawn a secondary thread to decode wallpapers.

The threading API's are not very mature, so this code looks a bit crufty
but it does take the load off the WindowServer main thread when changing
wallpapers. :^)
This commit is contained in:
Andreas Kling 2019-05-01 16:07:47 +02:00
parent cff3685a4c
commit 6614746ca8
3 changed files with 39 additions and 11 deletions

View file

@ -85,7 +85,7 @@ public:
void set_resolution(int width, int height);
bool set_wallpaper(const String& path);
bool set_wallpaper(const String& path, Function<void(bool)>&& callback);
String wallpaper_path() const { return m_wallpaper_path; }
const WSCursor& active_cursor() const;
@ -144,6 +144,7 @@ private:
void tell_wm_listener_about_window_icon(WSWindow& listener, WSWindow&);
void tell_wm_listener_about_window_rect(WSWindow& listener, WSWindow&);
void pick_new_active_window();
void finish_setting_wallpaper(const String& path, Retained<GraphicsBitmap>&&);
WSScreen& m_screen;
Rect m_screen_rect;