At the moment animation worklets are running on the compositor thread [1]. We should move to having a dedicated "Animation Thread" for animation worklet tasks.
At the moment, this involves the following changes:
- AnimationWorklet should create its own backing thread
- Introduce a new CompositorAnimator implementation that posts tasks
to animation thread upon mutation.
- Use this new CompositorAnimator to worklet rAF
Note that currently we don't use the MutatbleStateProvider with
animation worklet so the only state that needs to be passed
across thread is just the monotonic time of the frame.
[1] https://codesearch.chromium.org/chromium/src/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp?type=cs&sq=package:chromium&l=51
Comment 1 by majidvp@chromium.org
, Jun 9 2017Labels: Hotlist-ThreadedRendering