New issue
Advanced search Search tips

Issue 720080 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 430155
issue 814851


Participants' hotlists:
Hotlist-AnimationWorklet
Hostlist-AnimationWorklet-OT


Sign in to add a comment

AnimationWorklet - Add WorkletAnimation in Blink (with JS bindings)

Project Member Reported by smcgruer@chromium.org, May 9 2017

Issue description

From the AnimationWorklet WIP.md[0], we need a 'WorkletAnimation' class for users to pass in. Based on that doc, the class is a simple PoD which is constructed from:

  i. A non-empty sequence of KeyframeEffects
  ii. A non-empty sequence of either DocumentTimeline or ScrollTimelines
  iii. A dictionary for extra user data (which may be empty).

It does not even need to have the inputs be JS-readable, as far as I can tell.

[0]: https://github.com/WICG/animation-worklet/blob/gh-pages/WIP.md
 
>   ii. A non-empty sequence of either DocumentTimeline or ScrollTimelines

To be clear, this is a non-empty sequence where each element can be either a DocumentTimeline or a ScrollTimeline. That is, a mixture of the two types of timeline is explicitly allowed.
Blocking: 430155
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7af2f07e7458da6bab556dd3a2f2dcac3f73276

commit c7af2f07e7458da6bab556dd3a2f2dcac3f73276
Author: smcgruer <smcgruer@chromium.org>
Date: Tue Sep 12 15:56:52 2017

Initial implementation of main thread WorkletAnimation IDL

This change adds a WorkletAnimation object accessible in the main js scope,
when the CompositorWorker (the old name for AnimationWorklet) Blink runtime
feature is enabled. WorkletAnimation objects are hooked up to the document's
animation lifecycle, owned by a WorkletAnimationController. The controller
will attempt to start them on the compositor, but this currently fails due
to lack of support in the animation logic.

BUG= 720080 

Review-Url: https://chromiumcodereview.appspot.com/2869183002
Cr-Commit-Position: refs/heads/master@{#501292}

[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/worklet-animation-creation.html
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/bindings/modules/v8/generated.gni
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/animation/BUILD.gn
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/animation/WorkletAnimationBase.h
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/animation/WorkletAnimationController.h
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/modules/compositorworker/BUILD.gn
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/modules/compositorworker/WorkletAnimation.cpp
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/modules/compositorworker/WorkletAnimation.h
[add] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/modules/compositorworker/WorkletAnimation.idl
[modify] https://crrev.com/c7af2f07e7458da6bab556dd3a2f2dcac3f73276/third_party/WebKit/Source/modules/modules_idl_files.gni

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e

commit 1e24bf869b2d16ee5a6e43a428c93f8ba220a49e
Author: Stephen McGruer <smcgruer@chromium.org>
Date: Wed Nov 22 19:49:50 2017

Make WorkletAnimation constructor closer to being spec compliant

Instead of requiring a sequence of KeyframeEffectReadOnly we now accept
either a single AnimationEffectReadOnly object or a sequence of
AnimationEffectReadOnly objects. This is closer to what the spec
requires, although there are still some caveats:

  i. Internally in the code, we do require that each
     AnimationEffectReadOnly is actually a KeyframeEffectReadOnly. This
     is fine for now as KeyframeEffectReadOnly is the only public
     subclass of AnimationEffectReadOnly.
  ii. We still do not support either a null 'effects' argument or an
      empty list, which are allowed by the spec.

Bug:  720080 
Change-Id: Ie36cde427d604cdb0d2b1be277ae1939c8d22f54
Reviewed-on: https://chromium-review.googlesource.com/766950
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518713}
[modify] https://crrev.com/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e/third_party/WebKit/LayoutTests/virtual/threaded/fast/animationworklet/worklet-animation-creation.html
[modify] https://crrev.com/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e/third_party/WebKit/Source/bindings/modules/v8/generated.gni
[modify] https://crrev.com/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e/third_party/WebKit/Source/modules/animationworklet/WorkletAnimation.cpp
[modify] https://crrev.com/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e/third_party/WebKit/Source/modules/animationworklet/WorkletAnimation.h
[modify] https://crrev.com/1e24bf869b2d16ee5a6e43a428c93f8ba220a49e/third_party/WebKit/Source/modules/animationworklet/WorkletAnimation.idl

Labels: Hotlist-Experimental
Blocking: 814851
Cc: smcgruer@chromium.org
Labels: -Type-Bug Type-Feature
Owner: majidvp@chromium.org
Majid - what work is still required here for AW Origin Trial? Should we consider this done and open more specific issues?
Status: Fixed (was: Assigned)
We have separate issues for other key features that need changes to the idl. Let's mark this as fixed.

Sign in to add a comment