1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibWeb: Add basic support for requestAnimationFrame()

We now support rAF, driven by GUI::DisplayLink callbacks. It's a bit
strange how we keep registering new callbacks over and over.
That's something we can definitely optimize.

This allows you to update animations/whatever without doing it more
often than the browser can display.
This commit is contained in:
Andreas Kling 2020-03-22 21:15:49 +01:00
parent 424a3f5ac3
commit 39045bfde8
5 changed files with 56 additions and 2 deletions

View file

@ -28,6 +28,8 @@ public:
private:
explicit CanvasRenderingContext2D(HTMLCanvasElement&);
void did_draw(const Gfx::Rect&);
OwnPtr<Gfx::Painter> painter();
WeakPtr<HTMLCanvasElement> m_element;