| OLD | NEW | 
|    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_host_common.h" |    5 #include "cc/trees/layer_tree_host_common.h" | 
|    6  |    6  | 
|    7 #include <stddef.h> |    7 #include <stddef.h> | 
|    8  |    8  | 
|    9 #include <algorithm> |    9 #include <algorithm> | 
|   10  |   10  | 
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  360   // The root surface always gets added to the render surface  list. |  360   // The root surface always gets added to the render surface  list. | 
|  361   AddSurfaceToRenderSurfaceList(root_surface, render_surface_list, |  361   AddSurfaceToRenderSurfaceList(root_surface, render_surface_list, | 
|  362                                 property_trees); |  362                                 property_trees); | 
|  363   // For all non-skipped layers, add their target to the render surface list if |  363   // For all non-skipped layers, add their target to the render surface list if | 
|  364   // it's not already been added, and add their content rect to the target |  364   // it's not already been added, and add their content rect to the target | 
|  365   // surface's accumulated content rect. |  365   // surface's accumulated content rect. | 
|  366   for (LayerImpl* layer : *layer_tree_impl) { |  366   for (LayerImpl* layer : *layer_tree_impl) { | 
|  367     DCHECK(layer); |  367     DCHECK(layer); | 
|  368     // TODO(crbug.com/726423): LayerImpls should never have invalid PropertyTree |  368     // TODO(crbug.com/726423): LayerImpls should never have invalid PropertyTree | 
|  369     // indices. |  369     // indices. | 
|  370     if (!layer || !layer->HasValidPropertyTreeIndices()) |  370     if (!layer) | 
|  371       continue; |  371       continue; | 
 |  372     layer->set_contributes_to_drawn_render_surface(false); | 
 |  373     layer->set_raster_even_if_not_drawn(false); | 
|  372  |  374  | 
|  373     layer->set_contributes_to_drawn_render_surface(false); |  375     if (!layer->HasValidPropertyTreeIndices()) | 
 |  376       continue; | 
|  374  |  377  | 
|  375     bool is_root = layer_tree_impl->IsRootLayer(layer); |  378     bool is_root = layer_tree_impl->IsRootLayer(layer); | 
|  376  |  379  | 
|  377     bool skip_draw_properties_computation = |  380     bool skip_draw_properties_computation = | 
|  378         draw_property_utils::LayerShouldBeSkippedForDrawPropertiesComputation( |  381         draw_property_utils::LayerShouldBeSkippedForDrawPropertiesComputation( | 
|  379             layer, property_trees->transform_tree, property_trees->effect_tree); |  382             layer, property_trees->transform_tree, property_trees->effect_tree); | 
|  380  |  383  | 
|  381     bool skip_for_invertibility = SkipForInvertibility(layer, property_trees); |  384     bool skip_for_invertibility = SkipForInvertibility(layer, property_trees); | 
|  382  |  385  | 
|  383     bool skip_layer = !is_root && (skip_draw_properties_computation || |  386     bool skip_layer = !is_root && (skip_draw_properties_computation || | 
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  676  |  679  | 
|  677 PropertyTrees* GetPropertyTrees(Layer* layer) { |  680 PropertyTrees* GetPropertyTrees(Layer* layer) { | 
|  678   return layer->layer_tree_host()->property_trees(); |  681   return layer->layer_tree_host()->property_trees(); | 
|  679 } |  682 } | 
|  680  |  683  | 
|  681 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |  684 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 
|  682   return layer->layer_tree_impl()->property_trees(); |  685   return layer->layer_tree_impl()->property_trees(); | 
|  683 } |  686 } | 
|  684  |  687  | 
|  685 }  // namespace cc |  688 }  // namespace cc | 
| OLD | NEW |