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 |