mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-03 04:42:19 +02: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
@@ -73,6 +73,7 @@ public:
|
||||
virtual double device_pixels_per_css_pixel() const override { return 1.0; }
|
||||
virtual CSS::PreferredColorScheme preferred_color_scheme() const override { return m_host_page->client().preferred_color_scheme(); }
|
||||
virtual void request_file(FileRequest) override { }
|
||||
virtual void paint_next_frame() override { }
|
||||
virtual void paint(DevicePixelRect const&, Gfx::Bitmap&, Web::PaintOptions = {}) override { }
|
||||
virtual void schedule_repaint() override { }
|
||||
virtual bool is_ready_to_paint() const override { return true; }
|
||||
|
||||
Reference in New Issue
Block a user