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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 | 113 |
114 void LayerTreeImpl::RecreateResources() { | 114 void LayerTreeImpl::RecreateResources() { |
115 if (root_layer_) { | 115 if (root_layer_) { |
116 LayerTreeHostCommon::CallFunctionForEveryLayer( | 116 LayerTreeHostCommon::CallFunctionForEveryLayer( |
117 this, [](LayerImpl* layer) { layer->RecreateResources(); }, | 117 this, [](LayerImpl* layer) { layer->RecreateResources(); }, |
118 CallFunctionLayerType::ALL_LAYERS); | 118 CallFunctionLayerType::ALL_LAYERS); |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 void LayerTreeImpl::GatherFrameTimingRequestIds( | |
123 std::vector<int64_t>* request_ids) { | |
124 if (!root_layer_) | |
125 return; | |
126 | |
127 // TODO(vmpstr): Early out if there are no requests on any of the layers. For | |
128 // that, we need to inform LayerTreeImpl whenever there are requests when we | |
129 // get them. | |
130 LayerTreeHostCommon::CallFunctionForEveryLayer( | |
131 this, | |
132 [request_ids](LayerImpl* layer) { | |
133 layer->GatherFrameTimingRequestIds(request_ids); | |
134 }, | |
135 CallFunctionLayerType::ALL_LAYERS); | |
136 } | |
137 | |
138 bool LayerTreeImpl::IsViewportLayerId(int id) const { | 122 bool LayerTreeImpl::IsViewportLayerId(int id) const { |
139 if (id == inner_viewport_scroll_layer_id_ || | 123 if (id == inner_viewport_scroll_layer_id_ || |
140 id == outer_viewport_scroll_layer_id_) | 124 id == outer_viewport_scroll_layer_id_) |
141 return true; | 125 return true; |
142 if (InnerViewportContainerLayer() && | 126 if (InnerViewportContainerLayer() && |
143 id == InnerViewportContainerLayer()->id()) | 127 id == InnerViewportContainerLayer()->id()) |
144 return true; | 128 return true; |
145 if (OuterViewportContainerLayer() && | 129 if (OuterViewportContainerLayer() && |
146 id == OuterViewportContainerLayer()->id()) | 130 id == OuterViewportContainerLayer()->id()) |
147 return true; | 131 return true; |
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2097 } | 2081 } |
2098 | 2082 |
2099 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { | 2083 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { |
2100 layers_that_should_push_properties_.clear(); | 2084 layers_that_should_push_properties_.clear(); |
2101 for (auto* layer : *this) | 2085 for (auto* layer : *this) |
2102 layer->ResetChangeTracking(); | 2086 layer->ResetChangeTracking(); |
2103 property_trees_.ResetAllChangeTracking(flag); | 2087 property_trees_.ResetAllChangeTracking(flag); |
2104 } | 2088 } |
2105 | 2089 |
2106 } // namespace cc | 2090 } // namespace cc |
OLD | NEW |