Bug 1660531 [wpt PR 25190] - Make a custom property composited if used by Paint Workl...
commit4fc0a6ab8a723158bdc98173acc19a9141e9440c
authorXida Chen <xidachen@chromium.org>
Tue, 6 Oct 2020 14:16:16 +0000 (6 14:16 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 8 Oct 2020 10:17:56 +0000 (8 10:17 +0000)
tree533346f700920beba4ca3388361e056bc750792c
parentcadd2f48e39ce24bec89520e90626d1b98dd4559
Bug 1660531 [wpt PR 25190] - Make a custom property composited if used by Paint Worklet, a=testonly

Automatic update from web-platform-tests
Make a custom property composited if used by Paint Worklet

Paint worklet already works with custom property animation running
on the compositor thread, the requirement is that we need
“will-change: transform” for the paint worklet element. Without
that, the custom property animation will run on the main thread,
such as this example: https://output.jsbin.com/muwiyux/quiet.

This CL makes changes such that a custom property animation will
always be composited as long as it is used by paint worklet, even
if the element doesn't have "will-change: transform".

The change is actually small, there are only two things we need:
1. Start the animation on compositor.
2. Ensure the compositor ticks the animation.

For #1, we add a "has_paint_worklet_with_custom_prop_anim" in
the Animation::PreCommit, when it is true, we always composite
the animation.

For #2, we give a special ElementId which is uint64_t::max() to
the paint worklet element, and on the CC side, once we see that
element id, we know that the animation associated with that should
be ticking even if the element id doesn't have anything associated
on the property tree.

Bug: 987969
Change-Id: Ia849640065470e529a2b8d23a4b7b74339831c48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359370
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812056}

--

wpt-commits: 01487129f258d99fa2a04f0efd76e0d815a50d25
wpt-pr: 25190
testing/web-platform/tests/css/css-paint-api/one-custom-property-animation.https.html
testing/web-platform/tests/css/css-paint-api/two-custom-property-animation.https.html