mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:27:35 +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:
parent
ac63d1e59d
commit
02936f6944
17 changed files with 68 additions and 152 deletions
|
@ -28,6 +28,8 @@ public:
|
|||
|
||||
static void set_use_gpu_painter();
|
||||
|
||||
void schedule_repaint();
|
||||
|
||||
virtual Web::Page& page() override { return *m_page; }
|
||||
virtual Web::Page const& page() const override { return *m_page; }
|
||||
|
||||
|
@ -75,7 +77,6 @@ private:
|
|||
virtual double device_pixels_per_css_pixel() const override { return m_device_pixels_per_css_pixel; }
|
||||
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override { return m_preferred_color_scheme; }
|
||||
virtual void page_did_invalidate(Web::CSSPixelRect const&) override;
|
||||
virtual void page_did_change_selection() override;
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
|
||||
virtual void page_did_layout() override;
|
||||
virtual void page_did_change_title(ByteString const&) override;
|
||||
|
@ -148,8 +149,8 @@ private:
|
|||
bool m_should_show_line_box_borders { false };
|
||||
bool m_has_focus { false };
|
||||
|
||||
RefPtr<Web::Platform::Timer> m_invalidation_coalescing_timer;
|
||||
Web::DevicePixelRect m_invalidation_rect;
|
||||
RefPtr<Web::Platform::Timer> m_repaint_timer;
|
||||
|
||||
Web::CSS::PreferredColorScheme m_preferred_color_scheme { Web::CSS::PreferredColorScheme::Auto };
|
||||
|
||||
RefPtr<WebDriverConnection> m_webdriver;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue