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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2087963003: cc: Stop creating unused 0 property tree nodes other than transform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 0263d5537c286c66985dc5c18281a7356d6deafc..cf7e1f56765e869692602d91d6ba084c1dbd3d14 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -302,7 +302,8 @@ enum PropertyTreeOption {
static void ComputeLayerScrollsDrawnDescendants(LayerTreeImpl* layer_tree_impl,
ScrollTree* scroll_tree) {
- for (int i = static_cast<int>(scroll_tree->size()) - 1; i > 0; --i) {
+ for (int i = static_cast<int>(scroll_tree->size()) - 1;
+ i > ScrollTree::kRootNodeId; --i) {
ScrollNode* node = scroll_tree->Node(i);
scroll_tree->parent(node)->num_drawn_descendants +=
node->num_drawn_descendants;
@@ -324,7 +325,8 @@ static void ComputeInitialRenderSurfaceLayerList(
LayerImplList* render_surface_layer_list,
bool can_render_to_separate_surface) {
ScrollTree* scroll_tree = &property_trees->scroll_tree;
- for (int i = 0; i < static_cast<int>(scroll_tree->size()); ++i)
+ for (int i = ScrollTree::kRootNodeId;
+ i < static_cast<int>(scroll_tree->size()); ++i)
scroll_tree->Node(i)->num_drawn_descendants = 0;
// Add all non-skipped surfaces to the initial render surface layer list. Add
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698