Animators running in AnimationWorklet global scope update local times of their keyframes.
These values should be send back to compositor and main thread so the effect are appropriately updated.
Here is a sketch of how this may be done.
Plumbing from Worklet -> CC:
- Wait until |AnimationWorkletrProxyClientImpl::Mutate| is complete
- Collect local time values for all active animators
- Create a plumbing to apply mutation from: AnimationWorkletrProxyClientImpl->CompositorMutator->[CompositorMutatorClient/LayerTreeMutator]->AnimationHost
- Pass the collected state via above plumbing to AnimationHost (impl side)
- AnimationHost updates corresponding animation players in cc
Plumbing from CC -> Main:
I think this can be part of the existing SetEvents process that allows syncing impl to main sides of AnimationHost
- Create an UPDATE_TIME Event for each local time update in previous work
- When applying these event on main thread, simply update the animation player local time
- This in turn needs to update various delegates which will eventually reach the blink::Animation and blink::KeyframeEffect
Once this is done we can remove the followings:
* LayerTreeMutator::TakeMutations
* CompositorMutationsTarget
* CustomCompositorAnimationManager
Comment 1 by petermayo@chromium.org
, Sep 1 2017