Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce something like Gecko's refresh driver #3406

Open
jdm opened this issue Sep 18, 2014 · 4 comments
Open

Introduce something like Gecko's refresh driver #3406

jdm opened this issue Sep 18, 2014 · 4 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Sep 18, 2014

From @bzbarsky:

It's basically a tick that we use to update our on-screen presentation.

When it ticks, we update the document timebase, resample animations/transitions, call requestAnimationFrame callbacks, recompute style and then layout, and paint.

We initially added it for the animation/transition bits and have been moving more and more things into there as time goes on. 

This makes sense, and we'll need something like this when we eventually get around to CSS transitions, video, etc.

@nox
Copy link
Member

@nox nox commented Sep 29, 2017

Didn't we implement this already?

@jdm
Copy link
Member Author

@jdm jdm commented Sep 29, 2017

We don't have a single unified mechanism, I don't think. We have individual messages for processing animations and rAF, and this is handled separately from styling and layout.

@mrobinson
Copy link
Member

@mrobinson mrobinson commented May 14, 2020

I think all that's required here is for advanceClock() to also trigger rAF callbacks. it already ticks animations, which should theoretically trigger a restyle and reflow.

@jdm
Copy link
Member Author

@jdm jdm commented May 14, 2020

The other difference we have right now is that we trigger layout at the end of every turn of the event loop (as well as manually in response to a bunch of things like mouse events and rAF callbacks). Part of introducing something like the refresh driver would be removing those, so that layout only happens in response to queries and the refresh driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.