[css-houdini-drafts] Improve potential for generating multiple animation frames in parallel

majido has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== Improve potential for generating multiple animation frames in parallel ==
_From @majido on August 29, 2017 17:39_

(Note: Issue was created based on feedback from Houdini Paris F2F - [irc logs](https://logs.csswg.org/irc.w3.org/houdini/2017-08-01/))


There is interest in improving opportunities for user-agent to generate more animation frames in
parallel. Current API only allows running individual animators in parallel but there are still
potential to do more. For example it is useful to generate multiple frames for the same
animations in parallel an/or ahead of time.

## Pure Effects
If an animation is pure (i.e., has no internal state), then it is possible to 
generate multiple frames for it in parallel by passing new input and recording the output. 
Here are few improvements to the API that leverage this:

 - Introduce a mode (maybe this should be the default) where animator is assumed to be pure. We can enforce this via the same mechanisms that is used for paint worklet e.g., random assignments to global scope  and dropping the animator object. (Strawman API: https://gist.github.com/anonymous/e22250dbdfa92da59508a220b8087d9d) 

 - Enable even more effects to be written in this mode. For example if we expose scroll velocity and acceleration then a lots of existing effects don't need to have to keep state to compute it.

## Additional idea - Speculative execution
Browsers can also speculatively run an animator in parallel as if it is pure and then fallback to normal operation if they detect a conflict.




_Copied from original issue: WICG/animation-worklet#87_

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/812 using your GitHub account

Received on Wednesday, 29 August 2018 18:19:31 UTC