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 ImageIdFlatSet& images_to_invalidate) { |
| 323 DCHECK(IsSyncTree()); |
| 324 |
| 325 if (images_to_invalidate.empty()) |
| 326 return; |
| 327 |
| 328 for (auto* picture_layer : picture_layers_) |
| 329 picture_layer->InvalidateRegionForImages(images_to_invalidate); |
| 330 } |
| 331 |
321 bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const { | 332 bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const { |
322 return layer_list_.empty() ? false : layer_list_[0] == layer; | 333 return layer_list_.empty() ? false : layer_list_[0] == layer; |
323 } | 334 } |
324 | 335 |
325 LayerImpl* LayerTreeImpl::InnerViewportScrollLayer() const { | 336 LayerImpl* LayerTreeImpl::InnerViewportScrollLayer() const { |
326 return LayerById(inner_viewport_scroll_layer_id_); | 337 return LayerById(inner_viewport_scroll_layer_id_); |
327 } | 338 } |
328 | 339 |
329 LayerImpl* LayerTreeImpl::OuterViewportScrollLayer() const { | 340 LayerImpl* LayerTreeImpl::OuterViewportScrollLayer() const { |
330 return LayerById(outer_viewport_scroll_layer_id_); | 341 return LayerById(outer_viewport_scroll_layer_id_); |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2093 | 2104 |
2094 void LayerTreeImpl::ResetAllChangeTracking() { | 2105 void LayerTreeImpl::ResetAllChangeTracking() { |
2095 layers_that_should_push_properties_.clear(); | 2106 layers_that_should_push_properties_.clear(); |
2096 // Iterate over all layers, including masks. | 2107 // Iterate over all layers, including masks. |
2097 for (auto& layer : *layers_) | 2108 for (auto& layer : *layers_) |
2098 layer->ResetChangeTracking(); | 2109 layer->ResetChangeTracking(); |
2099 property_trees_.ResetAllChangeTracking(); | 2110 property_trees_.ResetAllChangeTracking(); |
2100 } | 2111 } |
2101 | 2112 |
2102 } // namespace cc | 2113 } // namespace cc |
OLD | NEW |