Skip to content

Relation to update-the-rendering #87

Open

Description

@chrishtr

(related to #85)

Re: https://github.com/WebKit/explainers/tree/main/animation-frame-rate

If there is an animation declared to be at a different frame rate than the update-the-rendering steps, then how does the processing model for updates work?

  • Is the proposal to do some updates that skip some of these steps, and "only" update the animation? i.e. are you proposing that requestAnimationFrame, ResizeObserver, resize event, IntersectionObserver, etc steps don't run in such updates? Or only if it happens to coincide with the update-the-rendering timing?

  • How should the developer indicate that they'd like animations to be synced if possible?

  • If the regular update-the-rendering steps are not customizable, that could lose an opportunity for lowering the frame rate for devices that are low on battery.

Activity

  1. smfr commented on Dec 17, 2021

    @smfr

    These are good questions, and I think the explainer should explain them!

  2. graouts commented on Dec 17, 2021

    @graouts
    Contributor

    @chrishtr when you say:

    How should the developer indicate that they'd like animations to be synced if possible?

    What is the thing you'd like the animations to be synced with? Issue #84 has a fair bit of discussion about how animations are synced with each other, but since you mention others steps from the "update the rendering" procedure, I wanted to be sure this was what you meant.

  3. chrishtr commented on Dec 17, 2021

    @chrishtr
    Author

    What is the thing you'd like the animations to be synced with? Issue #84 has a fair bit of discussion about how animations are synced with each other, but since you mention others steps from the "update the rendering" procedure, I wanted to be sure this was what you meant.

    You might want scrolling and an animation to have the same frame rate, for example. This particular example is also related to the update-the-rendering steps, because scroll events happen during update-the-rendering.

    I am skeptical that it's a good idea to have main thread animation or scroll updates that require style / layout, but that don't invoke some of the update-the-rendering steps, because all of the related specs and APIs depend on this processing model, and implementations are architected around it.

    And if the animation does run those steps, that means requestAnimationFrame fires at that rate. So it's unclear to me how to make a main-thread animation that doesn't run at the same frame rate as requestAnimationFrame, or that implies the latter runs faster than 60fps.

    I do think there is room to consider running some animations slower than 60fps, but if it isn't an integer multiple of the update-the-rendering steps, then it'll cause even more update-the renderings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    animationsuseful for animation-related explainers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions