mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27: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
Notes:
sideshowbarker
2024-07-16 21:45:42 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/b8d18ebcf7 Pull-request: https://github.com/SerenityOS/serenity/pull/24476
@@ -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