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

Issue 1950243005: Communicate MT changes to impl-only scroll offset animations (Closed)

Created:
4 years, 7 months ago by ymalik
Modified:
4 years, 7 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-layout_chromium.org, cc-bugs_chromium.org, chromium-reviews, eae+blinkwatch, Eric Willigers, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rjwright, shans, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Communicate MT changes to impl-only scroll offset animations This CL adds cc::ScrollOffsetAnimations which is the MT version of cc::ScrollOffsetAnimationsImpl. The flow is as follows: The scroll offset is changed on the MT (e.g. scroll anchoring adjustment) while there is an ongoing impl-only scroll offset animation. ScrollAnimator::updateImplOnlyAnimationWithAdjustment is called, which pushes the update to MT's cc::AnimationHost via CompositorAnimationTimeline::CompositorAnimationHost::AnimationHost. During commit, cc::ScrollOffsetAnimations::PushPropertiesTo calls the relevant handler in response to the update. Once the updates are applied, the list of updates is cleared. This is described in http://bit.ly/1Y6RA6y. Note that in this CL, this path is only exercised from ScrollAnchor.cpp BUG=594456 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/f3a9e63578aff4d5c814a5bb374665a4a0812834 Cr-Commit-Position: refs/heads/master@{#394947}

Patch Set 1 #

Total comments: 15

Patch Set 2 : apply initial feedback comments #

Total comments: 13

Patch Set 3 : review comments #

Total comments: 23

Patch Set 4 : address review comments #

Total comments: 5

Patch Set 5 : loyso's feedback #

Patch Set 6 : skobes' feedback #

Total comments: 4

Patch Set 7 : #

Total comments: 8

Patch Set 8 : jbroman's feedback #

Total comments: 1

Patch Set 9 : nit + rebase master #

Patch Set 10 : fix bot #

Patch Set 11 : rebase master #

Patch Set 12 : attempt to fix rebase issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+449 lines, -19 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M cc/animation/animation_host.h View 1 2 3 4 5 4 chunks +6 lines, -1 line 0 comments Download
M cc/animation/animation_host.cc View 1 2 3 4 5 6 chunks +19 lines, -3 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/animation/scroll_offset_animation_curve.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A cc/animation/scroll_offset_animations.h View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
A cc/animation/scroll_offset_animations.cc View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
M cc/animation/scroll_offset_animations_impl.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M cc/animation/scroll_offset_animations_impl.cc View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 7 8 9 2 chunks +104 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ScrollAnchor.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/animation/CompositorAnimationHost.h View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/platform/animation/CompositorAnimationHostTest.cpp View 1 2 3 4 1 chunk +8 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.cpp View 1 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h View 1 2 3 4 5 6 7 8 6 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (25 generated)
ymalik
4 years, 7 months ago (2016-05-06 00:11:34 UTC) #4
loyso (OOO)
Big things first. https://codereview.chromium.org/1950243005/diff/1/cc/animation/animation_host.h File cc/animation/animation_host.h (right): https://codereview.chromium.org/1950243005/diff/1/cc/animation/animation_host.h#newcode160 cc/animation/animation_host.h:160: bool HasScrollOffsetAnimationUpdatesForTesting() const; It's better to ...
4 years, 7 months ago (2016-05-06 01:04:39 UTC) #6
ymalik
https://codereview.chromium.org/1950243005/diff/1/cc/animation/animation_host.h File cc/animation/animation_host.h (right): https://codereview.chromium.org/1950243005/diff/1/cc/animation/animation_host.h#newcode160 cc/animation/animation_host.h:160: bool HasScrollOffsetAnimationUpdatesForTesting() const; On 2016/05/06 01:04:38, loyso wrote: > ...
4 years, 7 months ago (2016-05-06 05:41:49 UTC) #7
skobes
https://codereview.chromium.org/1950243005/diff/20001/cc/animation/animation_host.cc File cc/animation/animation_host.cc (right): https://codereview.chromium.org/1950243005/diff/20001/cc/animation/animation_host.cc#newcode206 cc/animation/animation_host.cc:206: // beforethe sync below because it may add new ...
4 years, 7 months ago (2016-05-07 00:25:16 UTC) #9
loyso (OOO)
On 2016/05/06 05:41:49, ymalik1 wrote: > It's not clear to me what that would look ...
4 years, 7 months ago (2016-05-09 01:02:58 UTC) #10
loyso (OOO)
In an ideal world, introducing CompositorAnimationHost is a huge task on its own (a separate ...
4 years, 7 months ago (2016-05-09 01:38:11 UTC) #11
ymalik
@loyso, spoke to you offline and concluded that I'll add the suggested changes to CompositorAnimationHost ...
4 years, 7 months ago (2016-05-10 19:40:59 UTC) #12
loyso (OOO)
Thanks ymalik for major fixes! Sorry for one-word comments - those are nits mostly. Could ...
4 years, 7 months ago (2016-05-11 06:25:45 UTC) #13
loyso (OOO)
PS: https://codereview.chromium.org/1950243005/diff/40001/third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.cpp File third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.cpp (right): https://codereview.chromium.org/1950243005/diff/40001/third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.cpp#newcode35 third_party/WebKit/Source/platform/animation/CompositorAnimationTimeline.cpp:35: return CompositorAnimationHost(m_animationTimeline->animation_host()); Please notice, no DCHECK here. https://codereview.chromium.org/1950243005/diff/40001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp ...
4 years, 7 months ago (2016-05-11 06:28:59 UTC) #14
ymalik
@loyso, skobes PTAL :) https://codereview.chromium.org/1950243005/diff/20001/cc/animation/scroll_offset_animation_curve.cc File cc/animation/scroll_offset_animation_curve.cc (right): https://codereview.chromium.org/1950243005/diff/20001/cc/animation/scroll_offset_animation_curve.cc#newcode114 cc/animation/scroll_offset_animation_curve.cc:114: SetInitialValue(ScrollOffsetWithDelta(GetValue(t), adjustment)); On 2016/05/10 19:40:59, ...
4 years, 7 months ago (2016-05-12 22:31:26 UTC) #15
loyso (OOO)
Thanks for all those fixes! Could you run trybots to see if any dchecks/failures? Also, ...
4 years, 7 months ago (2016-05-13 01:14:19 UTC) #16
loyso (OOO)
https://codereview.chromium.org/1950243005/diff/60001/third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp File third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp (right): https://codereview.chromium.org/1950243005/diff/60001/third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp#newcode22 third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp:22: return; This is clearly exceptional situation when the compositor ...
4 years, 7 months ago (2016-05-13 01:27:10 UTC) #17
ymalik
https://codereview.chromium.org/1950243005/diff/60001/cc/animation/animation_host.cc File cc/animation/animation_host.cc (right): https://codereview.chromium.org/1950243005/diff/60001/cc/animation/animation_host.cc#newcode209 cc/animation/animation_host.cc:209: // be pushed to the impl thread. On 2016/05/13 ...
4 years, 7 months ago (2016-05-13 03:11:04 UTC) #18
ymalik
@loyso, @skobes, PTAL :)
4 years, 7 months ago (2016-05-13 22:34:31 UTC) #19
skobes
lgtm
4 years, 7 months ago (2016-05-14 00:09:20 UTC) #20
loyso (OOO)
LGTM with a nit. https://codereview.chromium.org/1950243005/diff/100001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp (right): https://codereview.chromium.org/1950243005/diff/100001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp#newcode262 third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp:262: for (auto& update : m_implOnlyAnimationAdjustments) ...
4 years, 7 months ago (2016-05-16 02:50:37 UTC) #21
ajuma
https://codereview.chromium.org/1950243005/diff/100001/cc/trees/layer_tree_host_unittest_animation.cc File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/1950243005/diff/100001/cc/trees/layer_tree_host_unittest_animation.cc#newcode907 cc/trees/layer_tree_host_unittest_animation.cc:907: EXPECT_EQ(gfx::ScrollOffset(750.f, 850.f), curve->target_value()); Do you need to take current_offset_ ...
4 years, 7 months ago (2016-05-16 13:41:57 UTC) #22
ymalik
@ajuma, PTAL :) https://codereview.chromium.org/1950243005/diff/100001/cc/trees/layer_tree_host_unittest_animation.cc File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/1950243005/diff/100001/cc/trees/layer_tree_host_unittest_animation.cc#newcode907 cc/trees/layer_tree_host_unittest_animation.cc:907: EXPECT_EQ(gfx::ScrollOffset(750.f, 850.f), curve->target_value()); On 2016/05/16 13:41:57, ...
4 years, 7 months ago (2016-05-16 18:21:37 UTC) #23
ajuma
Thanks, lgtm
4 years, 7 months ago (2016-05-16 18:38:52 UTC) #24
ymalik
+jbroman for Source/platform
4 years, 7 months ago (2016-05-16 18:47:19 UTC) #26
jbroman
Looks like platform/animation/ was already reviewed, so I'll focus on the rest of platform/. https://codereview.chromium.org/1950243005/diff/120001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp ...
4 years, 7 months ago (2016-05-16 19:15:11 UTC) #27
ymalik
@jbroman, PTAL :) https://codereview.chromium.org/1950243005/diff/120001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp File third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp (right): https://codereview.chromium.org/1950243005/diff/120001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp#newcode251 third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp:251: if (getScrollableArea()->layerForScrolling() && timeline && !timeline->compositorAnimationHost().isNull()) ...
4 years, 7 months ago (2016-05-16 20:52:35 UTC) #28
jbroman
ok, platform lgtm https://codereview.chromium.org/1950243005/diff/140001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h File third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h (right): https://codereview.chromium.org/1950243005/diff/140001/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h#newcode139 third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h:139: // A list of updates that ...
4 years, 7 months ago (2016-05-16 21:01:48 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/160001
4 years, 7 months ago (2016-05-16 21:31:32 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/229776)
4 years, 7 months ago (2016-05-16 22:51:43 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/160001
4 years, 7 months ago (2016-05-17 17:36:31 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/230438)
4 years, 7 months ago (2016-05-17 20:21:26 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/160001
4 years, 7 months ago (2016-05-17 21:04:21 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/230649)
4 years, 7 months ago (2016-05-17 23:54:14 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/180001
4 years, 7 months ago (2016-05-18 20:01:26 UTC) #45
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/layout/ScrollAnchor.cpp: While running git apply --index -3 -p1; error: patch ...
4 years, 7 months ago (2016-05-18 22:53:11 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/200001
4 years, 7 months ago (2016-05-18 23:41:55 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/68704) ios-device on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 7 months ago (2016-05-18 23:46:16 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/220001
4 years, 7 months ago (2016-05-19 22:10:00 UTC) #55
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-20 00:51:43 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950243005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950243005/220001
4 years, 7 months ago (2016-05-20 01:11:51 UTC) #60
commit-bot: I haz the power
4 years, 7 months ago (2016-05-20 01:32:27 UTC) #62
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/f3a9e63578aff4d5c814a5bb374665a4a0812834
Cr-Commit-Position: refs/heads/master@{#394947}

Powered by Google App Engine
This is Rietveld 408576698