Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(980)

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 2360003002: cc: Compute SurfacePropertyChanged without depending on owning layer (Closed)
Patch Set: Address review comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 target_tree->has_ever_been_drawn_ = false; 484 target_tree->has_ever_been_drawn_ = false;
485 } 485 }
486 486
487 void LayerTreeImpl::MoveChangeTrackingToLayers() { 487 void LayerTreeImpl::MoveChangeTrackingToLayers() {
488 // We need to update the change tracking on property trees before we move it 488 // We need to update the change tracking on property trees before we move it
489 // onto the layers. 489 // onto the layers.
490 property_trees_.UpdateChangeTracking(); 490 property_trees_.UpdateChangeTracking();
491 for (auto* layer : *this) { 491 for (auto* layer : *this) {
492 if (layer->LayerPropertyChanged()) 492 if (layer->LayerPropertyChanged())
493 layer->NoteLayerPropertyChanged(); 493 layer->NoteLayerPropertyChanged();
494 if (layer->render_surface() &&
495 layer->render_surface()->AncestorPropertyChanged())
496 layer->render_surface()->NoteAncestorPropertyChanged();
494 } 497 }
495 } 498 }
496 499
497 LayerImplList::const_iterator LayerTreeImpl::begin() const { 500 LayerImplList::const_iterator LayerTreeImpl::begin() const {
498 return layer_list_.cbegin(); 501 return layer_list_.cbegin();
499 } 502 }
500 503
501 LayerImplList::const_iterator LayerTreeImpl::end() const { 504 LayerImplList::const_iterator LayerTreeImpl::end() const {
502 return layer_list_.cend(); 505 return layer_list_.cend();
503 } 506 }
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 2094
2092 void LayerTreeImpl::ResetAllChangeTracking() { 2095 void LayerTreeImpl::ResetAllChangeTracking() {
2093 layers_that_should_push_properties_.clear(); 2096 layers_that_should_push_properties_.clear();
2094 // Iterate over all layers, including masks and replicas. 2097 // Iterate over all layers, including masks and replicas.
2095 for (auto& layer : *layers_) 2098 for (auto& layer : *layers_)
2096 layer->ResetChangeTracking(); 2099 layer->ResetChangeTracking();
2097 property_trees_.ResetAllChangeTracking(); 2100 property_trees_.ResetAllChangeTracking();
2098 } 2101 }
2099 2102
2100 } // namespace cc 2103 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698