Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 1734063003: Share animations from compositor to main thread. (Closed)

Created:
4 years, 10 months ago by ymalik
Modified:
4 years, 9 months ago
Reviewers:
ajuma, Rick Byers
CC:
chromium-reviews, shans, blink-reviews-platform-graphics_chromium.org, dshwang, vmpstr+blinkwatch_chromium.org, kinuko+watch, rwlbuis, krit, drott+blinkwatch_chromium.org, Justin Novosad, dglazkov+blink, Rik, blink-reviews, blink-reviews-api_chromium.org, Eric Willigers, cc-bugs_chromium.org, rjwright, jbroman, pdr+graphicswatchlist_chromium.org, darktears, Stephen Chennney, blink-reviews-animation_chromium.org, f(malita), danakj+watch_chromium.org, skobes
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Share animations from compositor to main thread. This CL introduces a new state that a compositor animation can be in, namely, ABORT_BUT_NEEDS_COMPLETION. When a main thread scrolling reason is added, the current scroll offset animation is put into this state. The layer animation controller looks for impl-only animations in this state and passes a TAKEOVER animation event to the main thread with the animation_curve. The main thread then completes the animation. Notes: - This CL is for impl only animations, i.e, the jidder bug won't be fixed for an animation running on cc that was initiated by the main thread (keyboard scroll). Future CL will add the takeover logic for MT-initiated animations. - This CL doesn't support the takeover notification from the old animation path. The old path is where we don't use CompositorAnimationPlayer and its better to not add the plumbing for something that will be removed soon anyway. Design-doc https://docs.google.com/a/google.com/document/d/1JUYvp5gilux7bca8vfmE4Rr5BUjSthizmz7g4BnOnBA/edit?usp=sharing Test page: http://philipwalton.github.io/polyfill/demos/position-sticky/ BUG=581875 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/6581bb3e791018e48d078a910ddfdce19a1c10bb Cr-Commit-Position: refs/heads/master@{#378411}

Patch Set 1 #

Patch Set 2 : windows compile error debugging #

Patch Set 3 : fix windows compile #

Patch Set 4 : added tests #

Patch Set 5 : Make NotifyAnimationTakeover pure virtual #

Total comments: 18

Patch Set 6 : worked on review comments #

Total comments: 2

Patch Set 7 : nit #

Patch Set 8 : fix win trybot failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+478 lines, -36 lines) Patch
M cc/animation/animation.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download
M cc/animation/animation.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M cc/animation/animation_delegate.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M cc/animation/animation_events.h View 3 chunks +11 lines, -1 line 0 comments Download
M cc/animation/animation_events.cc View 1 chunk +32 lines, -1 line 0 comments Download
M cc/animation/animation_host.h View 2 chunks +2 lines, -1 line 0 comments Download
M cc/animation/animation_host.cc View 1 2 3 4 5 4 chunks +18 lines, -4 lines 0 comments Download
M cc/animation/animation_player.h View 1 2 3 4 5 3 chunks +7 lines, -1 line 0 comments Download
M cc/animation/animation_player.cc View 1 2 3 4 5 2 chunks +16 lines, -2 lines 0 comments Download
M cc/animation/animation_registrar.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/animation/element_animations.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M cc/animation/element_animations.cc View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M cc/animation/layer_animation_controller.h View 2 chunks +3 lines, -1 line 0 comments Download
M cc/animation/layer_animation_controller.cc View 1 2 3 4 5 4 chunks +54 lines, -2 lines 0 comments Download
M cc/animation/layer_animation_controller_unittest.cc View 1 2 3 4 5 3 chunks +77 lines, -0 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve.cc View 2 chunks +6 lines, -1 line 0 comments Download
M cc/blink/web_to_cc_animation_delegate_adapter.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M cc/layers/layer_impl.h View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M cc/test/animation_timelines_test_common.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/test_hooks.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 2 chunks +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorScrollOffsetAnimationCurve.h View 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorScrollOffsetAnimationCurve.cpp View 2 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositorFactory.h View 2 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositorFactory.cpp View 2 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.h View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 4 5 4 chunks +44 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (14 generated)
skobes
FYI, I patched this in but it's giving me some compiler errors... FAILED: ninja -t ...
4 years, 10 months ago (2016-02-26 02:04:10 UTC) #2
ymalik
Hey Ali, sorry for the large CL. I think the crux here is in LayerAnimationController/AnimationEvent/ScrollAnimator/LayerImpl, ...
4 years, 10 months ago (2016-02-26 19:05:25 UTC) #8
ajuma
Nice work, this mostly looks great. https://codereview.chromium.org/1734063003/diff/80001/cc/animation/animation_delegate.h File cc/animation/animation_delegate.h (right): https://codereview.chromium.org/1734063003/diff/80001/cc/animation/animation_delegate.h#newcode28 cc/animation/animation_delegate.h:28: double animation_start_time, This ...
4 years, 10 months ago (2016-02-26 23:56:55 UTC) #9
ymalik
Hey Ali, PTAL :) https://codereview.chromium.org/1734063003/diff/80001/cc/animation/animation_delegate.h File cc/animation/animation_delegate.h (right): https://codereview.chromium.org/1734063003/diff/80001/cc/animation/animation_delegate.h#newcode28 cc/animation/animation_delegate.h:28: double animation_start_time, On 2016/02/26 23:56:54, ...
4 years, 9 months ago (2016-02-29 16:31:09 UTC) #10
ajuma
Thanks, lgtm.
4 years, 9 months ago (2016-02-29 17:57:36 UTC) #11
ymalik
+Rick for Source/platform, public/platform
4 years, 9 months ago (2016-02-29 18:04:49 UTC) #14
Rick Byers
public/platform LGTM (with nit) Source/platform rubber-stamp LGTM (ajuma is an expert in this space) https://codereview.chromium.org/1734063003/diff/100001/third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h ...
4 years, 9 months ago (2016-02-29 18:35:33 UTC) #15
ymalik
@Rick, PTAL :) https://codereview.chromium.org/1734063003/diff/100001/third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h File third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h (right): https://codereview.chromium.org/1734063003/diff/100001/third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h#newcode20 third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h:20: // TODO(ymalik): Make pure virtual. On ...
4 years, 9 months ago (2016-02-29 18:40:05 UTC) #16
Rick Byers
>> Looks like there's a few subclasses, so I assume you'd rather do this in ...
4 years, 9 months ago (2016-02-29 20:21:35 UTC) #17
ymalik
On 2016/02/29 20:21:35, Rick Byers wrote: > >> Looks like there's a few subclasses, so ...
4 years, 9 months ago (2016-02-29 21:48:28 UTC) #18
Rick Byers
On 2016/02/29 21:48:28, ymalik1 wrote: > On 2016/02/29 20:21:35, Rick Byers wrote: > > >> ...
4 years, 9 months ago (2016-02-29 22:30:00 UTC) #19
ajuma
On 2016/02/29 22:30:00, Rick Byers wrote: > On 2016/02/29 21:48:28, ymalik1 wrote: > > On ...
4 years, 9 months ago (2016-02-29 22:37:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1734063003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1734063003/140001
4 years, 9 months ago (2016-03-01 05:21:08 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1734063003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1734063003/140001
4 years, 9 months ago (2016-03-01 05:21:51 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 9 months ago (2016-03-01 07:32:19 UTC) #28
commit-bot: I haz the power
4 years, 9 months ago (2016-03-01 07:33:45 UTC) #30
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6581bb3e791018e48d078a910ddfdce19a1c10bb
Cr-Commit-Position: refs/heads/master@{#378411}

Powered by Google App Engine
This is Rietveld 408576698