mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
WebContent: Cancel pending paint requests when removing a backing store
If there are pending paint requests waiting to be processed when the client asks us to remove a backing store, we now prune them from the request queue. This avoids doing completely wasted painting work while resizing the browser window. :^)
This commit is contained in:
parent
b28beb691e
commit
463dc91049
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ void ConnectionFromClient::add_backing_store(i32 backing_store_id, Gfx::Shareabl
|
|||
void ConnectionFromClient::remove_backing_store(i32 backing_store_id)
|
||||
{
|
||||
m_backing_stores.remove(backing_store_id);
|
||||
m_pending_paint_requests.remove_all_matching([backing_store_id](auto& pending_repaint_request) { return pending_repaint_request.bitmap_id == backing_store_id; });
|
||||
}
|
||||
|
||||
void ConnectionFromClient::paint(Gfx::IntRect const& content_rect, i32 backing_store_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue