diff options
author | Tom <tomut@yahoo.com> | 2021-06-13 06:16:06 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-20 14:57:26 +0200 |
commit | 4392da970ac0fc433530579b13030a41ff4a8f59 (patch) | |
tree | cfae0a3ddc1b6c4f2db9f4cf7984eba761f3b5f0 /Userland/Libraries/LibWeb | |
parent | 499c33ae0cf8892dfdf851c178b2b9f7a8bfb79f (diff) | |
download | serenity-4392da970ac0fc433530579b13030a41ff4a8f59.zip |
WindowServer: Add initial support for rendering on multiple screens
This allows WindowServer to use multiple framebuffer devices and
compose the desktop with any arbitrary layout. Currently, it is assumed
that it is configured contiguous and non-overlapping, but this should
eventually be enforced.
To make rendering efficient, each window now also tracks on which
screens it needs to be rendered. This way we don't have to iterate all
the windows for each screen but instead use the same rendering loop and
then only render to the screen (or screens) that the window actually
uses.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/OutOfProcessWebView.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/OutOfProcessWebView.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp index 3208398fea..e84be38764 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp @@ -71,7 +71,7 @@ void OutOfProcessWebView::create_client() client().async_update_system_theme(Gfx::current_system_theme_buffer()); client().async_update_system_fonts(Gfx::FontDatabase::default_font_query(), Gfx::FontDatabase::fixed_width_font_query()); - client().async_update_screen_rect(GUI::Desktop::the().rect()); + client().async_update_screen_rects(GUI::Desktop::the().rects(), GUI::Desktop::the().main_screen_index()); } void OutOfProcessWebView::load(const URL& url) @@ -192,9 +192,9 @@ void OutOfProcessWebView::theme_change_event(GUI::ThemeChangeEvent& event) request_repaint(); } -void OutOfProcessWebView::screen_rect_change_event(GUI::ScreenRectChangeEvent& event) +void OutOfProcessWebView::screen_rects_change_event(GUI::ScreenRectsChangeEvent& event) { - client().async_update_screen_rect(event.rect()); + client().async_update_screen_rects(event.rects(), event.main_screen_index()); } void OutOfProcessWebView::notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.h b/Userland/Libraries/LibWeb/OutOfProcessWebView.h index 8338291a1e..c82508f58c 100644 --- a/Userland/Libraries/LibWeb/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.h @@ -74,7 +74,7 @@ private: virtual void mousewheel_event(GUI::MouseEvent&) override; virtual void keydown_event(GUI::KeyEvent&) override; virtual void theme_change_event(GUI::ThemeChangeEvent&) override; - virtual void screen_rect_change_event(GUI::ScreenRectChangeEvent&) override; + virtual void screen_rects_change_event(GUI::ScreenRectsChangeEvent&) override; // ^AbstractScrollableWidget virtual void did_scroll() override; |