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 ffd16907d1b446d9a4e81d232ef2185f8d13b9ef..089e5a50fdbf5e3ea1717837d5e2d3987d4a36b5 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -2061,7 +2061,7 @@ static void CalculateDrawPropertiesInternal( |
// reduce how much would be drawn, and instead it would create unnecessary |
// changes to scissor state affecting GPU performance. Our clip information |
// is used in the recursion below, so we must set it beforehand. |
- layer_draw_properties.is_clipped = layer_or_ancestor_clips_descendants; |
+ DCHECK_EQ(layer_or_ancestor_clips_descendants, layer->is_clipped()); |
if (layer_or_ancestor_clips_descendants) { |
layer_draw_properties.clip_rect = clip_rect_in_target_space; |
} else { |
@@ -2407,13 +2407,16 @@ void LayerTreeHostCommon::UpdateRenderSurface( |
*draw_transform_is_axis_aligned = true; |
if (!layer->render_surface()) { |
layer->CreateRenderSurface(); |
+ layer->layer_tree_host()->property_trees()->needs_rebuild = true; |
ajuma
2015/07/10 22:16:18
How about doing this inside Layer::SetHasRenderSur
jaydasika
2015/07/13 14:38:44
Done.
|
} |
layer->SetHasRenderSurface(true); |
return; |
} |
layer->SetHasRenderSurface(false); |
- if (layer->render_surface()) |
+ if (layer->render_surface()) { |
layer->ClearRenderSurface(); |
+ layer->layer_tree_host()->property_trees()->needs_rebuild = true; |
+ } |
} |
void LayerTreeHostCommon::UpdateRenderSurfaces( |
@@ -2501,6 +2504,7 @@ void VerifyPropertyTreeValuesForLayer(LayerImpl* current_layer, |
<< "expected: " << current_layer->draw_opacity() |
<< " actual: " << DrawOpacityFromPropertyTrees( |
current_layer, property_trees->opacity_tree); |
+ |
const bool can_use_lcd_text_match = |
CanUseLcdTextFromPropertyTrees( |
current_layer, layers_always_allowed_lcd_text, can_use_lcd_text, |
@@ -2550,22 +2554,6 @@ void CalculateDrawPropertiesAndVerify(LayerTreeHostCommon::CalcDrawPropsInputs< |
inputs->verify_property_trees && |
(property_tree_option == BUILD_PROPERTY_TREES_IF_NEEDED); |
- if (should_measure_property_tree_performance) { |
- TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
- "LayerTreeHostCommon::CalculateDrawProperties"); |
- } |
- |
- std::vector<AccumulatedSurfaceState<LayerType>> accumulated_surface_state; |
- CalculateDrawPropertiesInternal<LayerType>( |
- inputs->root_layer, globals, data_for_recursion, |
- inputs->render_surface_layer_list, &dummy_layer_list, |
- &accumulated_surface_state, inputs->current_render_surface_layer_list_id); |
- |
- if (should_measure_property_tree_performance) { |
- TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
- "LayerTreeHostCommon::CalculateDrawProperties"); |
- } |
- |
if (inputs->verify_property_trees) { |
typename LayerType::LayerListType update_layer_list; |
@@ -2608,10 +2596,27 @@ void CalculateDrawPropertiesAndVerify(LayerTreeHostCommon::CalcDrawPropsInputs< |
break; |
} |
} |
+ } |
- VerifyPropertyTreeValues(inputs); |
+ if (should_measure_property_tree_performance) { |
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
+ "LayerTreeHostCommon::CalculateDrawProperties"); |
} |
+ std::vector<AccumulatedSurfaceState<LayerType>> accumulated_surface_state; |
+ CalculateDrawPropertiesInternal<LayerType>( |
+ inputs->root_layer, globals, data_for_recursion, |
+ inputs->render_surface_layer_list, &dummy_layer_list, |
+ &accumulated_surface_state, inputs->current_render_surface_layer_list_id); |
+ |
+ if (should_measure_property_tree_performance) { |
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
+ "LayerTreeHostCommon::CalculateDrawProperties"); |
+ } |
+ |
+ if (inputs->verify_property_trees) |
+ VerifyPropertyTreeValues(inputs); |
+ |
// The dummy layer list should not have been used. |
DCHECK_EQ(0u, dummy_layer_list.size()); |
// A root layer render_surface should always exist after |