mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
WebContent: Coalesce paint invalidations to avoid spamming client
Some content cause a lot of paint invalidations (e.g someone drawing to a <canvas> repeatedly) and we don't need to spam the client about this. Instead, accumulate a dirty rect, and send it once per event loop step.
This commit is contained in:
parent
82af69376b
commit
651f30dfbe
2 changed files with 11 additions and 2 deletions
|
@ -72,6 +72,9 @@ private:
|
|||
RefPtr<Gfx::PaletteImpl> m_palette_impl;
|
||||
Gfx::IntRect m_screen_rect;
|
||||
bool m_should_show_line_box_borders { false };
|
||||
|
||||
RefPtr<Core::Timer> m_invalidation_coalescing_timer;
|
||||
Gfx::IntRect m_invalidation_rect;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue