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

Unified Diff: cc/layer_impl.cc

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 188682 Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/delay_based_time_source.cc ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index d70b5b309272ba8f447a78c283ad99b4a03259e7..6f3e9d6fb4a11a8cae94923cae5944d03b720e8c 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -815,8 +815,9 @@ void LayerImpl::UpdateScrollbarPositions() {
return;
last_scroll_offset_ = current_offset;
- if (scrollbar_animation_controller_) {
- scrollbar_animation_controller_->didUpdateScrollOffset(
+ if (scrollbar_animation_controller_ &&
+ !scrollbar_animation_controller_->isScrollGestureInProgress()) {
+ scrollbar_animation_controller_->didProgrammaticallyUpdateScroll(
base::TimeTicks::Now());
}
@@ -906,8 +907,8 @@ void LayerImpl::SetScrollbarOpacity(float opacity) {
inline scoped_ptr<ScrollbarAnimationController>
CreateScrollbarAnimationControllerWithFade(LayerImpl* layer) {
- double fadeout_delay = 0.3;
- double fadeout_length = 0.3;
+ base::TimeDelta fadeout_delay = base::TimeDelta::FromMilliseconds(300);
+ base::TimeDelta fadeout_length = base::TimeDelta::FromMilliseconds(300);
return ScrollbarAnimationControllerLinearFade::create(
layer, fadeout_delay, fadeout_length)
.PassAs<ScrollbarAnimationController>();
« no previous file with comments | « cc/delay_based_time_source.cc ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698