Chromium Code Reviews| 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_) { | |
|
vmpstr
2017/02/10 19:25:43
nit: don't need braces. I know it all seems very a
Khushal
2017/02/10 22:09:19
I think I'm understanding how this works now. :P
| |
| 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 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2093 | 2101 |
| 2094 void LayerTreeImpl::ResetAllChangeTracking() { | 2102 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2095 layers_that_should_push_properties_.clear(); | 2103 layers_that_should_push_properties_.clear(); |
| 2096 // Iterate over all layers, including masks. | 2104 // Iterate over all layers, including masks. |
| 2097 for (auto& layer : *layers_) | 2105 for (auto& layer : *layers_) |
| 2098 layer->ResetChangeTracking(); | 2106 layer->ResetChangeTracking(); |
| 2099 property_trees_.ResetAllChangeTracking(); | 2107 property_trees_.ResetAllChangeTracking(); |
| 2100 } | 2108 } |
| 2101 | 2109 |
| 2102 } // namespace cc | 2110 } // namespace cc |
| OLD | NEW |