Skip to content

What is set_animation_state for? #21855

@paulrouget

Description

@paulrouget

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 Idle window event is generated). So blocking on window events works even during animations.

So, if my understand is right, it means that either:

  • the embedder doesn't need to know about the animation state of Servo, and we should remove the set_animation_state callback
  • servo should not bother waking up the compositor thread during animation and let embedder schedule that based on the animation state

@gw3583 you worked on that. Can you help me understand what we are supposed to do while animations are running?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions