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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // TODO(vmpstr): Early out if there are no requests on any of the layers. For | 105 // TODO(vmpstr): Early out if there are no requests on any of the layers. For |
106 // that, we need to inform LayerTreeImpl whenever there are requests when we | 106 // that, we need to inform LayerTreeImpl whenever there are requests when we |
107 // get them. | 107 // get them. |
108 LayerTreeHostCommon::CallFunctionForSubtree( | 108 LayerTreeHostCommon::CallFunctionForSubtree( |
109 root_layer_.get(), [request_ids](LayerImpl* layer) { | 109 root_layer_.get(), [request_ids](LayerImpl* layer) { |
110 layer->GatherFrameTimingRequestIds(request_ids); | 110 layer->GatherFrameTimingRequestIds(request_ids); |
111 }); | 111 }); |
112 } | 112 } |
113 | 113 |
114 bool LayerTreeImpl::IsExternalFlingActive() const { | 114 bool LayerTreeImpl::IsExternalScrollActive() const { |
115 return root_layer_scroll_offset_delegate_ && | 115 return root_layer_scroll_offset_delegate_ && |
116 root_layer_scroll_offset_delegate_->IsExternalFlingActive(); | 116 root_layer_scroll_offset_delegate_->IsExternalScrollActive(); |
117 } | 117 } |
118 | 118 |
119 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) { | 119 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) { |
120 int inner_layer_id = InnerViewportScrollLayer() | 120 int inner_layer_id = InnerViewportScrollLayer() |
121 ? InnerViewportScrollLayer()->id() | 121 ? InnerViewportScrollLayer()->id() |
122 : Layer::INVALID_ID; | 122 : Layer::INVALID_ID; |
123 int outer_layer_id = OuterViewportScrollLayer() | 123 int outer_layer_id = OuterViewportScrollLayer() |
124 ? OuterViewportScrollLayer()->id() | 124 ? OuterViewportScrollLayer()->id() |
125 : Layer::INVALID_ID; | 125 : Layer::INVALID_ID; |
126 if (layer_id != outer_layer_id && layer_id != inner_layer_id) | 126 if (layer_id != outer_layer_id && layer_id != inner_layer_id) |
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
1566 pending_page_scale_animation_ = pending_animation.Pass(); | 1566 pending_page_scale_animation_ = pending_animation.Pass(); |
1567 } | 1567 } |
1568 | 1568 |
1569 scoped_ptr<PendingPageScaleAnimation> | 1569 scoped_ptr<PendingPageScaleAnimation> |
1570 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1570 LayerTreeImpl::TakePendingPageScaleAnimation() { |
1571 return pending_page_scale_animation_.Pass(); | 1571 return pending_page_scale_animation_.Pass(); |
1572 } | 1572 } |
1573 | 1573 |
1574 } // namespace cc | 1574 } // namespace cc |
OLD | NEW |