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

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

Issue 1251323002: Plumb smooth scrolling in Chromium compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a blink page scale animation Created 5 years, 5 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
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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // TODO(vmpstr): Early out if there are no requests on any of the layers. For 107 // TODO(vmpstr): Early out if there are no requests on any of the layers. For
108 // that, we need to inform LayerTreeImpl whenever there are requests when we 108 // that, we need to inform LayerTreeImpl whenever there are requests when we
109 // get them. 109 // get them.
110 LayerTreeHostCommon::CallFunctionForSubtree( 110 LayerTreeHostCommon::CallFunctionForSubtree(
111 root_layer_.get(), [request_ids](LayerImpl* layer) { 111 root_layer_.get(), [request_ids](LayerImpl* layer) {
112 layer->GatherFrameTimingRequestIds(request_ids); 112 layer->GatherFrameTimingRequestIds(request_ids);
113 }); 113 });
114 } 114 }
115 115
116 bool LayerTreeImpl::IsExternalScrollActive() const {
117 return root_layer_scroll_offset_delegate_ &&
118 root_layer_scroll_offset_delegate_->IsExternalScrollActive();
119 }
120
121 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) { 116 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) {
122 int inner_layer_id = InnerViewportScrollLayer() 117 int inner_layer_id = InnerViewportScrollLayer()
123 ? InnerViewportScrollLayer()->id() 118 ? InnerViewportScrollLayer()->id()
124 : Layer::INVALID_ID; 119 : Layer::INVALID_ID;
125 int outer_layer_id = OuterViewportScrollLayer() 120 int outer_layer_id = OuterViewportScrollLayer()
126 ? OuterViewportScrollLayer()->id() 121 ? OuterViewportScrollLayer()->id()
127 : Layer::INVALID_ID; 122 : Layer::INVALID_ID;
128 if (layer_id != outer_layer_id && layer_id != inner_layer_id) 123 if (layer_id != outer_layer_id && layer_id != inner_layer_id)
129 return; 124 return;
130 125
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 const gfx::BoxF& box, 1734 const gfx::BoxF& box,
1740 gfx::BoxF* bounds) const { 1735 gfx::BoxF* bounds) const {
1741 *bounds = gfx::BoxF(); 1736 *bounds = gfx::BoxF();
1742 return layer_tree_host_impl_->animation_host() 1737 return layer_tree_host_impl_->animation_host()
1743 ? layer_tree_host_impl_->animation_host() 1738 ? layer_tree_host_impl_->animation_host()
1744 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 1739 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
1745 : true; 1740 : true;
1746 } 1741 }
1747 1742
1748 } // namespace cc 1743 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698