LibWeb: Add basic implementation of has_a_rendering_opportunity()

Return true only if we are ready to repaint. This fixes the issue where
requestAnimationFrame() was invoked more than once between repaints.
This commit is contained in:
Aliaksandr Kalenik 2024-03-18 20:11:06 +01:00 committed by Andreas Kling
parent e800605ad3
commit e3e6af39bc
Notes: sideshowbarker 2024-07-16 23:54:15 +09:00
6 changed files with 14 additions and 2 deletions

View file

@ -49,6 +49,7 @@ public:
virtual void request_file(FileRequest) 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; }
private:
explicit SVGPageClient(Page& host_page)