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

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: Fix telemetry unittest problem 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
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..6b2ff3718a5637af290cc4ab83a8c225d3ee1fdd 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -71,10 +71,9 @@ 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));
+static void ValidateRenderSurfacesRecursive(Layer* root_layer) {
+ for (auto* layer : *root_layer->layer_tree_host())
+ ValidateRenderSurfaceForLayer(layer);
}
#endif
@@ -374,12 +373,9 @@ void UpdateRenderSurfaceForLayer(EffectTree* effect_tree,
}
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));
- }
+ Layer* root_layer) {
+ for (auto* layer : *root_layer->layer_tree_host())
+ UpdateRenderSurfaceForLayer(effect_tree, true, layer);
jaydasika 2016/04/27 18:21:10 This and ValidateRenderSurfacesRecursive can be de
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698