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

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed)

Created:
7 years, 9 months ago by aelias_OOO_until_Jul13
Modified:
7 years, 9 months ago
Reviewers:
jamesr
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

cc: Delay start of scrollbar animation setNeedsRedraw. This adds a 300ms delay triggered at ScrollEnd in order to avoid beginning the setNeedsRedraw cycle until we really start fading the scrollbar, in order to improve performance during non-fling scrolls. Notes: - I switched to notifying the animator about ScrollBegin/ScrollEnd when the currently scrolling layer is attached/detached, and suppress fading until ScrollEnd. - The scrollUpdate path is still needed for when the scroll position changes due to e.g. Javascript, but it's a no-op during a scroll gesture. - I deleted the pinchGesture logic for simplicity, as there's no reason to treat pinches differently from scrolls. - I switches cc::Thread to use TimeDelta for its postDelayedTask since I ran into some bugs with the flooring to milliseconds. I updated the few other callers. NOTRY=true BUG=181417 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188684

Patch Set 1 #

Patch Set 2 : Rebase to 187970 and update test #

Total comments: 1

Patch Set 3 : Switch to TimeDelta and rebase to 188233 #

Patch Set 4 : Switch to CurrentlyScrollingLayer-based approach and change cc::Thread to use TimeDelta #

Patch Set 5 : Move check for scroll in progress to LayerImpl #

Patch Set 6 : Add another unit test #

Patch Set 7 : Add more test expectations #

Total comments: 4

Patch Set 8 : git log #

Patch Set 9 : Rebase to 188682 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -83 lines) Patch
M cc/base/thread.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M cc/base/thread_impl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M cc/base/thread_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M cc/delay_based_time_source.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -4 lines 0 comments Download
M cc/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 6 chunks +31 lines, -15 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
M cc/layer_tree_impl.cc View 1 2 3 4 5 6 7 3 chunks +16 lines, -2 lines 0 comments Download
M cc/resource_update_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/scrollbar_animation_controller.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -3 lines 0 comments Download
M cc/scrollbar_animation_controller_linear_fade.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -8 lines 0 comments Download
M cc/scrollbar_animation_controller_linear_fade.cc View 1 2 3 4 5 2 chunks +36 lines, -12 lines 0 comments Download
M cc/scrollbar_animation_controller_linear_fade_unittest.cc View 1 2 3 4 5 6 6 chunks +28 lines, -21 lines 0 comments Download
M cc/single_thread_proxy.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl_client.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/layer_tree_test_common.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M cc/test/scheduler_test_common.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M cc/thread_proxy.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
aelias_OOO_until_Jul13
Hi James, PTAL.
7 years, 9 months ago (2013-03-13 08:11:06 UTC) #1
jamesr
Please no more doubles for times https://codereview.chromium.org/12408028/diff/3001/cc/layer_tree_host_impl.h File cc/layer_tree_host_impl.h (right): https://codereview.chromium.org/12408028/diff/3001/cc/layer_tree_host_impl.h#newcode68 cc/layer_tree_host_impl.h:68: virtual void RequestScrollbarAnimationOnImplThread(double ...
7 years, 9 months ago (2013-03-14 19:52:01 UTC) #2
aelias_OOO_until_Jul13
Agreed, switched to TimeDelta.
7 years, 9 months ago (2013-03-15 01:27:22 UTC) #3
jamesr
lgtm on content, but needs a bit of iteration on style https://codereview.chromium.org/12408028/diff/16023/cc/layer_tree_impl.cc File cc/layer_tree_impl.cc (right): ...
7 years, 9 months ago (2013-03-18 01:09:55 UTC) #4
aelias_OOO_until_Jul13
Nits addressed and rebased, landing.
7 years, 9 months ago (2013-03-18 06:43:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/12408028/27001
7 years, 9 months ago (2013-03-18 06:44:46 UTC) #6
commit-bot: I haz the power
7 years, 9 months ago (2013-03-18 06:45:21 UTC) #7
Message was sent while issue was closed.
Change committed as 188684

Powered by Google App Engine
This is Rietveld 408576698