Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhat is set_animation_state for? #21855
Open
Comments
|
I can't recall the specifics, sorry. I think the main issue is probably that if the compositor thread is going to sleep / being woken up during animation, it's quite likely that it will miss vsync due to OS scheduler timing differences. This would result in animation sometimes looking janky if that occurs? |
|
@gw3583 is it also possible that waking up the compositor thread too often might increase CPU consumption too? |
|
I can measure that. |
|
Related: #22926. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I understand, there are 2 ways we want to run the embedder event loop.
Either Servo is not animating, then we block on window events, either Servo is animating, and then we block on swap_buffer.
If I'm not mistaken, this behavior was introduced a while back: c825592
But when animating, a Recomposite message i sent to the compositor. And sending any message to the compositor end up waking up the event loop (a
Idlewindow event is generated). So blocking on window events works even during animations.So, if my understand is right, it means that either:
set_animation_statecallback@gw3583 you worked on that. Can you help me understand what we are supposed to do while animations are running?