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

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

Issue 1832233002: cc : Use effect tree to determine if a layer is inside replica (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/proto/property_tree.proto ('k') | cc/trees/property_tree.h » ('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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 settings().minimum_occlusion_tracking_size); 854 settings().minimum_occlusion_tracking_size);
855 855
856 // LayerIterator is used here instead of CallFunctionForSubtree to only 856 // LayerIterator is used here instead of CallFunctionForSubtree to only
857 // UpdateTilePriorities on layers that will be visible (and thus have valid 857 // UpdateTilePriorities on layers that will be visible (and thus have valid
858 // draw properties) and not because any ordering is required. 858 // draw properties) and not because any ordering is required.
859 LayerIterator end = LayerIterator::End(&render_surface_layer_list_); 859 LayerIterator end = LayerIterator::End(&render_surface_layer_list_);
860 for (LayerIterator it = LayerIterator::Begin(&render_surface_layer_list_); 860 for (LayerIterator it = LayerIterator::Begin(&render_surface_layer_list_);
861 it != end; ++it) { 861 it != end; ++it) {
862 occlusion_tracker.EnterLayer(it); 862 occlusion_tracker.EnterLayer(it);
863 863
864 // There are very few render targets so this should be cheap to do for 864 bool inside_replica = it->render_target()->InsideReplica();
865 // each layer instead of something more complicated.
866 bool inside_replica = false;
867 LayerImpl* layer = it->render_target();
868 while (layer && !inside_replica) {
869 if (layer->render_target()->has_replica())
870 inside_replica = true;
871 layer = layer->render_target()->parent();
872 }
873 865
874 // Don't use occlusion if a layer will appear in a replica, since the 866 // Don't use occlusion if a layer will appear in a replica, since the
875 // tile raster code does not know how to look for the replica and would 867 // tile raster code does not know how to look for the replica and would
876 // consider it occluded even though the replica is visible. 868 // consider it occluded even though the replica is visible.
877 // Since occlusion is only used for browser compositor (i.e. 869 // Since occlusion is only used for browser compositor (i.e.
878 // use_occlusion_for_tile_prioritization) and it won't use replicas, 870 // use_occlusion_for_tile_prioritization) and it won't use replicas,
879 // this should matter not. 871 // this should matter not.
880 872
881 if (it.represents_itself()) { 873 if (it.represents_itself()) {
882 Occlusion occlusion = 874 Occlusion occlusion =
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 } 2098 }
2107 2099
2108 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { 2100 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) {
2109 layers_that_should_push_properties_.clear(); 2101 layers_that_should_push_properties_.clear();
2110 for (auto* layer : *this) 2102 for (auto* layer : *this)
2111 layer->ResetChangeTracking(); 2103 layer->ResetChangeTracking();
2112 property_trees_.ResetAllChangeTracking(flag); 2104 property_trees_.ResetAllChangeTracking(flag);
2113 } 2105 }
2114 2106
2115 } // namespace cc 2107 } // namespace cc
OLDNEW
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698