| 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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 const gfx::BoxF& box, | 1711 const gfx::BoxF& box, |
| 1717 gfx::BoxF* bounds) const { | 1712 gfx::BoxF* bounds) const { |
| 1718 *bounds = gfx::BoxF(); | 1713 *bounds = gfx::BoxF(); |
| 1719 return layer_tree_host_impl_->animation_host() | 1714 return layer_tree_host_impl_->animation_host() |
| 1720 ? layer_tree_host_impl_->animation_host() | 1715 ? layer_tree_host_impl_->animation_host() |
| 1721 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 1716 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
| 1722 : true; | 1717 : true; |
| 1723 } | 1718 } |
| 1724 | 1719 |
| 1725 } // namespace cc | 1720 } // namespace cc |
| OLD | NEW |