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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 1921503005: cc: Move main thread hierarchy dependencies into PropertyTreeBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 686711e62a98f1e3dc5389625d36622e42bda4e3..83572680b861c38505dde2048b548e8e691a2ae1 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -71,11 +71,6 @@ static void ValidateRenderSurfaceForLayer(LayerType* layer) {
ValidateIsNotRootForIsolatedGroup(layer);
}
-static void ValidateRenderSurfacesRecursive(Layer* layer) {
- ValidateRenderSurfaceForLayer(layer);
- for (size_t i = 0; i < layer->children().size(); ++i)
- ValidateRenderSurfacesRecursive(layer->child_at(i));
-}
#endif
template <typename LayerType>
@@ -373,15 +368,6 @@ void UpdateRenderSurfaceForLayer(EffectTree* effect_tree,
layer->SetHasRenderSurface(false);
}
-void UpdateRenderSurfacesForLayersRecursive(EffectTree* effect_tree,
- Layer* layer) {
- UpdateRenderSurfaceForLayer(effect_tree, true, layer);
-
- for (size_t i = 0; i < layer->children().size(); ++i) {
- UpdateRenderSurfacesForLayersRecursive(effect_tree, layer->child_at(i));
- }
-}
-
} // namespace
template <typename LayerType>
@@ -658,11 +644,12 @@ static void ComputeVisibleRectsInternal(
}
void UpdateRenderSurfaces(Layer* root_layer, PropertyTrees* property_trees) {
- UpdateRenderSurfacesForLayersRecursive(&property_trees->effect_tree,
- root_layer);
+ for (auto* layer : *root_layer->layer_tree_host()) {
+ UpdateRenderSurfaceForLayer(&property_trees->effect_tree, true, layer);
#if DCHECK_IS_ON()
- ValidateRenderSurfacesRecursive(root_layer);
+ ValidateRenderSurfaceForLayer(layer);
#endif
+ }
}
void UpdatePropertyTrees(PropertyTrees* property_trees,
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698