[animation-worklet] Fix crash in tests when running on main thread
Worklet animation supports invalidation of its compositing state. This patch makes this invalidation process a no-op for animations that are running on main (i.e., |compositor_animation_| is null). This means we no longer try to read/modify the non-existent |compositor_animation_| which was causing the crash. Note that in some situations, even for currently main thread animaiton, we may actually want to create and start the |compositor_animation_| but this is a separate issue that can be fixed as a follow up. The added DCHECK uncovered a bug where we were attaching the worklet animation to early even if play was failing. This is also fixed. Bug: 887659, 889330 Change-Id: I4a89de6632e053f68beafb810355c25e4bfba0e3 Reviewed-on: https://chromium-review.googlesource.com/c/1249387 Commit-Queue: Majid Valipour <majidvp@chromium.org> Reviewed-by:Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/master@{#597199}
Showing
Please register or sign in to comment