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

LibWebView+WebContent: Drive repainting from WebContent process

With this change, chrome no longer has to ask the WebContent process
to paint the next frame into a specified bitmap. Instead, it allocates
bitmaps and sends them to WebContent, which then lets chrome know when
the painting is done.

This work is a preparation to move the execution of painting commands
into a separate thread. Now, it is much easier to start working on the
next frame while the current one is still rendering. This is because
WebContent does not have to inform chrome that the current frame is
ready before it can request the next frame.

Additionally, as a side bonus, we can now eliminate the
did_invalidate_content_rect and did_change_selection IPC calls. These
were used solely for the purpose of informing chrome that it needed to
request a repaint.
This commit is contained in:
Aliaksandr Kalenik 2023-12-21 22:58:54 +01:00 committed by Andreas Kling
parent ac63d1e59d
commit 02936f6944
17 changed files with 68 additions and 152 deletions

View file

@ -70,6 +70,7 @@ public:
CSSPixelPoint device_to_css_point(DevicePixelPoint) const;
DevicePixelPoint css_to_device_point(CSSPixelPoint) const;
DevicePixelRect css_to_device_rect(CSSPixelRect) const;
CSSPixelRect device_to_css_rect(DevicePixelRect) const;
DevicePixelRect enclosing_device_rect(CSSPixelRect) const;
DevicePixelRect rounded_device_rect(CSSPixelRect) const;
@ -238,7 +239,6 @@ public:
virtual void page_did_create_new_document(Web::DOM::Document&) { }
virtual void page_did_destroy_document(Web::DOM::Document&) { }
virtual void page_did_finish_loading(const AK::URL&) { }
virtual void page_did_change_selection() { }
virtual void page_did_request_cursor_change(Gfx::StandardCursor) { }
virtual void page_did_request_context_menu(CSSPixelPoint) { }
virtual void page_did_request_link_context_menu(CSSPixelPoint, AK::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }