mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 12:07:35 +00:00
LibWeb: Use 'now' from EventLoop for animation frame callbacks
Previously, 'now' was set to the time `requestAnimationFrame()` was called, and the EventLoop's 'now' was ignored. This was a little odd and meant the time was always in the past.
This commit is contained in:
parent
0577a664dd
commit
38855de829
2 changed files with 5 additions and 6 deletions
|
@ -43,11 +43,11 @@ struct AnimationFrameCallbackDriver {
|
|||
return true;
|
||||
}
|
||||
|
||||
void run()
|
||||
void run(double now)
|
||||
{
|
||||
auto taken_callbacks = move(m_callbacks);
|
||||
for (auto& [id, callback] : taken_callbacks)
|
||||
callback(id);
|
||||
callback(now);
|
||||
}
|
||||
|
||||
bool has_callbacks() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue