mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWebView+WebContent: Let the WebView client broadcast when it painted
When the WebContent process has painted to its shared bitmaps, it sends a synchronous IPC to the browser process to let the chrome paint. It is synchronous to ensure the WC process doesn't paint onto the backing bitmap again while it is being displayed. However, this can cause a crash at exit if the browser process quits while the WC process is waiting for a response to this IPC. This patch makes the painting logic asynchronous by letting the browser process broadcast when it has finished handling the paint IPC. The WC process will not paint anything again until it receives that message. If it had tried to repaint while waiting for that message, that paint will be deferred until it arrives.
This commit is contained in:
committed by
Alexander Kalenik
parent
335097e446
commit
8b32f4ae7a
@@ -148,6 +148,11 @@ void ConnectionFromClient::add_backing_store(i32 front_bitmap_id, Gfx::Shareable
|
||||
m_backing_stores.back_bitmap = *const_cast<Gfx::ShareableBitmap&>(back_bitmap).bitmap();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::ready_to_paint()
|
||||
{
|
||||
page().ready_to_paint();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::process_next_input_event()
|
||||
{
|
||||
if (m_input_event_queue.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user