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 d9c71941f4fdcc034b1b3e09049ed62fb5d3176f..302ac236a15a3bbe47e32e5ccf8545def80d509a 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -78,7 +78,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs( |
const gfx::Vector2dF& elastic_overscroll, |
const LayerImpl* elastic_overscroll_application_layer, |
int max_texture_size, |
- bool can_render_to_separate_surface, |
bool can_adjust_raster_scales, |
bool verify_clip_tree_calculations, |
bool verify_visible_rect_calculations, |
@@ -96,7 +95,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs( |
elastic_overscroll_application_layer( |
elastic_overscroll_application_layer), |
max_texture_size(max_texture_size), |
- can_render_to_separate_surface(can_render_to_separate_surface), |
can_adjust_raster_scales(can_adjust_raster_scales), |
verify_clip_tree_calculations(verify_clip_tree_calculations), |
verify_visible_rect_calculations(verify_visible_rect_calculations), |
@@ -120,7 +118,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting:: |
gfx::Vector2dF(), |
NULL, |
std::numeric_limits<int>::max() / 2, |
- true, |
false, |
true, |
true, |
@@ -285,8 +282,7 @@ enum PropertyTreeOption { |
static void ComputeInitialRenderSurfaceLayerList( |
LayerTreeImpl* layer_tree_impl, |
PropertyTrees* property_trees, |
- LayerImplList* render_surface_layer_list, |
- bool can_render_to_separate_surface) { |
+ LayerImplList* render_surface_layer_list) { |
// Add all non-skipped surfaces to the initial render surface layer list. Add |
// all non-skipped layers to the layer list of their target surface, and |
// add their content rect to their target surface's accumulated content rect. |
@@ -305,9 +301,7 @@ static void ComputeInitialRenderSurfaceLayerList( |
if (skip_layer) |
continue; |
- bool render_to_separate_surface = |
- is_root || (can_render_to_separate_surface && layer->render_surface()); |
- |
+ bool render_to_separate_surface = is_root || layer->render_surface(); |
if (render_to_separate_surface) { |
DCHECK(layer->render_surface()); |
DCHECK(layer->render_target() == layer->render_surface()); |
@@ -434,7 +428,6 @@ static void CalculateRenderSurfaceLayerList( |
LayerTreeImpl* layer_tree_impl, |
PropertyTrees* property_trees, |
LayerImplList* render_surface_layer_list, |
- const bool can_render_to_separate_surface, |
const int max_texture_size) { |
// This calculates top level Render Surface Layer List, and Layer List for all |
// Render Surfaces. |
@@ -446,8 +439,7 @@ static void CalculateRenderSurfaceLayerList( |
// have an empty content rect. After surface content rects are computed, |
// produce a final RSLL that omits empty surfaces. |
ComputeInitialRenderSurfaceLayerList(layer_tree_impl, property_trees, |
- &initial_render_surface_list, |
- can_render_to_separate_surface); |
+ &initial_render_surface_list); |
ComputeSurfaceContentRects(layer_tree_impl, property_trees, |
&initial_render_surface_list, max_texture_size); |
ComputeListOfNonEmptySurfaces(layer_tree_impl, property_trees, |
@@ -482,8 +474,8 @@ void CalculateDrawPropertiesInternal( |
inputs->elastic_overscroll_application_layer, |
inputs->elastic_overscroll, inputs->page_scale_factor, |
inputs->device_scale_factor, gfx::Rect(inputs->device_viewport_size), |
- inputs->device_transform, inputs->can_render_to_separate_surface, |
- inputs->property_trees, &visible_layer_list); |
+ inputs->device_transform, inputs->property_trees, |
+ &visible_layer_list); |
// Property trees are normally constructed on the main thread and |
// passed to compositor thread. Source to parent updates on them are not |
@@ -528,8 +520,7 @@ void CalculateDrawPropertiesInternal( |
inputs->device_scale_factor, page_scale_factor_for_root, |
inputs->device_transform, inputs->root_layer->position()); |
draw_property_utils::ComputeVisibleRects( |
- inputs->root_layer, inputs->property_trees, |
- inputs->can_render_to_separate_surface, &visible_layer_list); |
+ inputs->root_layer, inputs->property_trees, &visible_layer_list); |
break; |
} |
} |
@@ -539,8 +530,6 @@ void CalculateDrawPropertiesInternal( |
"LayerTreeHostCommon::CalculateDrawProperties"); |
} |
- DCHECK(inputs->can_render_to_separate_surface == |
- inputs->property_trees->non_root_surfaces_enabled); |
for (LayerImpl* layer : visible_layer_list) { |
draw_property_utils::ComputeLayerDrawProperties(layer, |
inputs->property_trees); |
@@ -548,8 +537,7 @@ void CalculateDrawPropertiesInternal( |
CalculateRenderSurfaceLayerList( |
inputs->root_layer->layer_tree_impl(), inputs->property_trees, |
- inputs->render_surface_layer_list, inputs->can_render_to_separate_surface, |
- inputs->max_texture_size); |
+ inputs->render_surface_layer_list, inputs->max_texture_size); |
if (inputs->verify_clip_tree_calculations) |
draw_property_utils::VerifyClipTreeCalculations(visible_layer_list, |
@@ -571,7 +559,6 @@ void CalculateDrawPropertiesInternal( |
void LayerTreeHostCommon::CalculateDrawPropertiesForTesting( |
CalcDrawPropsMainInputsForTesting* inputs) { |
LayerList update_layer_list; |
- bool can_render_to_separate_surface = true; |
PropertyTrees* property_trees = |
inputs->root_layer->layer_tree_host()->property_trees(); |
Layer* overscroll_elasticity_layer = nullptr; |
@@ -583,8 +570,7 @@ void LayerTreeHostCommon::CalculateDrawPropertiesForTesting( |
inputs->page_scale_factor, inputs->device_scale_factor, |
gfx::Rect(inputs->device_viewport_size), inputs->device_transform, |
property_trees); |
- draw_property_utils::UpdatePropertyTrees(property_trees, |
- can_render_to_separate_surface); |
+ draw_property_utils::UpdatePropertyTrees(property_trees); |
draw_property_utils::FindLayersThatNeedUpdates( |
inputs->root_layer->layer_tree_host(), property_trees, |
&update_layer_list); |