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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 16925007: Fix scrollbar fade animation scheduling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return currently_scrolling_layer_; 149 return currently_scrolling_layer_;
150 } 150 }
151 151
152 void LayerTreeImpl::SetCurrentlyScrollingLayer(LayerImpl* layer) { 152 void LayerTreeImpl::SetCurrentlyScrollingLayer(LayerImpl* layer) {
153 if (currently_scrolling_layer_ == layer) 153 if (currently_scrolling_layer_ == layer)
154 return; 154 return;
155 155
156 if (currently_scrolling_layer_ && 156 if (currently_scrolling_layer_ &&
157 currently_scrolling_layer_->scrollbar_animation_controller()) 157 currently_scrolling_layer_->scrollbar_animation_controller())
158 currently_scrolling_layer_->scrollbar_animation_controller()-> 158 currently_scrolling_layer_->scrollbar_animation_controller()->
159 DidScrollGestureEnd(CurrentFrameTimeTicks()); 159 DidScrollGestureEnd(base::TimeTicks::Now());
160 currently_scrolling_layer_ = layer; 160 currently_scrolling_layer_ = layer;
161 if (layer && layer->scrollbar_animation_controller()) 161 if (layer && layer->scrollbar_animation_controller())
162 layer->scrollbar_animation_controller()->DidScrollGestureBegin(); 162 layer->scrollbar_animation_controller()->DidScrollGestureBegin();
163 } 163 }
164 164
165 void LayerTreeImpl::ClearCurrentlyScrollingLayer() { 165 void LayerTreeImpl::ClearCurrentlyScrollingLayer() {
166 SetCurrentlyScrollingLayer(NULL); 166 SetCurrentlyScrollingLayer(NULL);
167 scrolling_layer_id_from_previous_tree_ = 0; 167 scrolling_layer_id_from_previous_tree_ = 0;
168 } 168 }
169 169
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 void LayerTreeImpl::ClearLatencyInfo() { 564 void LayerTreeImpl::ClearLatencyInfo() {
565 latency_info_.Clear(); 565 latency_info_.Clear();
566 } 566 }
567 567
568 void LayerTreeImpl::WillModifyTilePriorities() { 568 void LayerTreeImpl::WillModifyTilePriorities() {
569 layer_tree_host_impl_->SetNeedsManageTiles(); 569 layer_tree_host_impl_->SetNeedsManageTiles();
570 } 570 }
571 571
572 } // namespace cc 572 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698