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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 void LayerTreeImpl::BuildLayerListForTesting() { | 313 void LayerTreeImpl::BuildLayerListForTesting() { |
314 ClearLayerList(); | 314 ClearLayerList(); |
315 LayerListIterator<LayerImpl> it(root_layer_for_testing_); | 315 LayerListIterator<LayerImpl> it(root_layer_for_testing_); |
316 for (; it != LayerListIterator<LayerImpl>(nullptr); ++it) { | 316 for (; it != LayerListIterator<LayerImpl>(nullptr); ++it) { |
317 AddToLayerList(*it); | 317 AddToLayerList(*it); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
| 321 void LayerTreeImpl::InvalidateRegionForImages( |
| 322 const std::unordered_set<uint32_t>& images_to_invalidate) { |
| 323 DCHECK(IsSyncTree()); |
| 324 for (auto* picture_layer : picture_layers_) { |
| 325 picture_layer->InvalidateRegionForImages(images_to_invalidate); |
| 326 } |
| 327 } |
| 328 |
321 bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const { | 329 bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const { |
322 return layer_list_.empty() ? false : layer_list_[0] == layer; | 330 return layer_list_.empty() ? false : layer_list_[0] == layer; |
323 } | 331 } |
324 | 332 |
325 LayerImpl* LayerTreeImpl::InnerViewportScrollLayer() const { | 333 LayerImpl* LayerTreeImpl::InnerViewportScrollLayer() const { |
326 return LayerById(inner_viewport_scroll_layer_id_); | 334 return LayerById(inner_viewport_scroll_layer_id_); |
327 } | 335 } |
328 | 336 |
329 LayerImpl* LayerTreeImpl::OuterViewportScrollLayer() const { | 337 LayerImpl* LayerTreeImpl::OuterViewportScrollLayer() const { |
330 return LayerById(outer_viewport_scroll_layer_id_); | 338 return LayerById(outer_viewport_scroll_layer_id_); |
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 | 2096 |
2089 void LayerTreeImpl::ResetAllChangeTracking() { | 2097 void LayerTreeImpl::ResetAllChangeTracking() { |
2090 layers_that_should_push_properties_.clear(); | 2098 layers_that_should_push_properties_.clear(); |
2091 // Iterate over all layers, including masks. | 2099 // Iterate over all layers, including masks. |
2092 for (auto& layer : *layers_) | 2100 for (auto& layer : *layers_) |
2093 layer->ResetChangeTracking(); | 2101 layer->ResetChangeTracking(); |
2094 property_trees_.ResetAllChangeTracking(); | 2102 property_trees_.ResetAllChangeTracking(); |
2095 } | 2103 } |
2096 | 2104 |
2097 } // namespace cc | 2105 } // namespace cc |
OLD | NEW |