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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments on PatchSet4 Created 5 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/test/fake_layer_tree_host_impl.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 ffd16907d1b446d9a4e81d232ef2185f8d13b9ef..b23e40ea3c806bea5279935250d777f220046991 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;
+ CHECK_EQ(layer_or_ancestor_clips_descendants, layer->is_clipped());
ajuma 2015/07/09 18:13:50 I think this should be a DCHECK rather than a CHEC
if (layer_or_ancestor_clips_descendants) {
layer_draw_properties.clip_rect = clip_rect_in_target_space;
} else {
@@ -2501,6 +2501,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 +2551,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 +2593,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
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.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