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

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed)

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

Description

Run smooth scroll animations on the compositor when possible This CL implements "immediate retargeting" shown in the following diagram: https://docs.google.com/drawings/d/1z76m-GMDgLI-clkfroLJ-5yhsHkmriZr_swP0kn5iw4 This CL does the following - Add a new state to ScrollAnimatorCompositorCoordinator to update the target offset on the compositor - Use the ScrollAnimatorCompositorCoordinator to schedule anim - Add plumbing from the animators to the animation controller to abort animations Sample test pages: yashmalik.com/nested_scroll_mousewheel_listener.html yashmalik.com/nested_scroll_mousewheel_listener_15ms_janky.html (tight loop in RAF) BUG=552556 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/5534a2b2972534b523014c803e1e0e0541855cc7 Cr-Commit-Position: refs/heads/master@{#366685}

Patch Set 1 #

Patch Set 2 : fix compile error on mac #

Total comments: 15

Patch Set 3 : worked on review comments #

Patch Set 4 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+469 lines, -70 lines) Patch
M cc/animation/animation_player.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/animation/animation_player.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M cc/blink/web_compositor_animation_player_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/blink/web_compositor_animation_player_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/blink/web_layer_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/blink/web_layer_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/layers/layer.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/layer.cc View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html View 1 2 1 chunk +114 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll-expected.txt View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll-expected.txt View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp View 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.h View 1 2 2 chunks +14 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 2 3 8 chunks +155 lines, -36 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h View 1 2 4 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h View 3 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp View 4 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp View 4 chunks +19 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp View 3 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/public/platform/WebCompositorAnimationPlayer.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebLayer.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
ymalik
5 years ago (2015-12-18 16:07:01 UTC) #4
ajuma
This looks great. A couple comments: https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html File third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html (right): https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html#newcode27 third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html:27: if (window.scrollX == ...
5 years ago (2015-12-18 19:02:54 UTC) #5
skobes
Awesome :) Just a few nits. https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html File third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html (right): https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html#newcode22 third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html:22: test is to ...
5 years ago (2015-12-18 19:05:58 UTC) #6
ymalik
https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html File third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html (right): https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html#newcode22 third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html:22: test is to ensure that smooth scrolling on the ...
5 years ago (2015-12-18 19:35:47 UTC) #7
skobes
lgtm Use this link in the CL description (viewable outside google.com): https://docs.google.com/drawings/d/1z76m-GMDgLI-clkfroLJ-5yhsHkmriZr_swP0kn5iw4
5 years ago (2015-12-18 19:50:02 UTC) #8
ajuma
lgtm too https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html File third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html (right): https://codereview.chromium.org/1534813004/diff/20001/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html#newcode27 third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html:27: if (window.scrollX == testCase.expectedX && window.scrollY == ...
5 years ago (2015-12-18 19:51:12 UTC) #9
ymalik
+Rick for WebKit/public/platform/ +Ian for WebKit/Source/platform/
5 years ago (2015-12-22 20:43:35 UTC) #12
Rick Byers
public/ RS LGTM (ajuma@ is an expert on the blink/cc integration impacted by these new ...
5 years ago (2015-12-22 20:56:09 UTC) #13
Ian Vollick
On 2015/12/22 20:56:09, Rick Byers wrote: > public/ RS LGTM (ajuma@ is an expert on ...
5 years ago (2015-12-22 21:54:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1534813004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1534813004/60001
5 years ago (2015-12-22 21:58:13 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years ago (2015-12-22 23:17:27 UTC) #19
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/5534a2b2972534b523014c803e1e0e0541855cc7 Cr-Commit-Position: refs/heads/master@{#366685}
5 years ago (2015-12-22 23:18:32 UTC) #21
Noel Gordon
Per https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/5360 virtual/threaded/fast/scroll-behavior/overflow-scroll-root-frame-animates.html virtual/threaded/fast/scroll-behavior/overflow-scroll-animates.html started failing. Was it due to this patch? (And we can't ...
5 years ago (2015-12-23 01:26:50 UTC) #22
Noel Gordon
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1548883002/ by noel@chromium.org. ...
5 years ago (2015-12-23 09:13:49 UTC) #23
Noel Gordon
5 years ago (2015-12-23 09:18:03 UTC) #24
Message was sent while issue was closed.
Also failing in Olipan Win Debug:

https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20Oilpan%2...

Powered by Google App Engine
This is Rietveld 408576698