[animation-worklet] worklet animation updates cc when timing changes
Introduce WorkletAnimation::UpdateCompositingState which is resposible to update cc side when necessary (e.g., during start or when there is a change while running). WorkletAnimation now notifies its controller that it has been invalidated once its timing has changed. This ensures it gets a change to update its compositing state on the next commit cycle. While animation is running, the state update is done by canceling and starting the keyframe effect on compositor side. This ensures the animation instance continues to live (with the same id) and thus keep any associated state while also updating its keyframes and timings. Other minor changes: - Use GetEffect() to access the main effect for the animation. - Refactor start logic. Tests: - virtual/threaded/fast/animationworklet/worklet-animation-set-timing.html test timing updates are reflected in cc. - virtual/threaded/fast/animationworklet/worklet-animation-set-keyframes.html test keyframe updates are reflected in cc. Bug: 833846 Change-Id: Icab984331a0584d9bd1eb38d24aef2f657070970 Reviewed-on: https://chromium-review.googlesource.com/1020239 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by:Majid Valipour <majidvp@chromium.org> Reviewed-by:
Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#554776}
Showing
Please register or sign in to comment