mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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
|
@ -39,8 +39,6 @@ public:
|
|||
String const& handle() const { return m_client_state.client_handle; }
|
||||
|
||||
void server_did_paint(Badge<WebContentClient>, i32 bitmap_id, Gfx::IntSize size);
|
||||
void server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect rect);
|
||||
void server_did_change_selection(Badge<WebContentClient>);
|
||||
|
||||
void load(AK::URL const&);
|
||||
void load_html(StringView);
|
||||
|
@ -194,7 +192,6 @@ protected:
|
|||
};
|
||||
void resize_backing_stores_if_needed(WindowResizeInProgress);
|
||||
|
||||
void request_repaint();
|
||||
void handle_resize();
|
||||
|
||||
virtual void create_client() { }
|
||||
|
@ -203,7 +200,6 @@ protected:
|
|||
|
||||
struct SharedBitmap {
|
||||
i32 id { -1 };
|
||||
i32 pending_paints { 0 };
|
||||
Web::DevicePixelSize last_painted_size;
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
};
|
||||
|
@ -215,7 +211,6 @@ protected:
|
|||
SharedBitmap back_bitmap;
|
||||
i32 next_bitmap_id { 0 };
|
||||
bool has_usable_bitmap { false };
|
||||
bool got_repaint_requests_while_painting { false };
|
||||
} m_client_state;
|
||||
|
||||
AK::URL m_url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue