mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 07:06:04 +00:00
LibWeb+WebContent: Change event loop to synchronously paint next frame
...instead of scheduling repaint timer in PageClient. This change fixes flickering on Discord that happened because: - Event loop schedules repainting by activating repaint timer - `Document::tear_down_layout_tree()` destroys paintable tree - Repaint timer invokes callback and renders an empty frame because paintable tree was destroyed
This commit is contained in:
committed by
Andreas Kling
parent
e806136116
commit
b8d18ebcf7
@@ -2133,8 +2133,9 @@ void Navigable::paint(Painting::RecordingPainter& recording_painter, PaintConfig
|
||||
auto background_color = document->background_color();
|
||||
|
||||
recording_painter.fill_rect(bitmap_rect, background_color);
|
||||
if (!document->paintable())
|
||||
return;
|
||||
if (!document->paintable()) {
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
Web::PaintContext context(recording_painter, page.palette(), page.client().device_pixels_per_css_pixel());
|
||||
context.set_device_viewport_rect(viewport_rect);
|
||||
|
||||
Reference in New Issue
Block a user