OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |