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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 1800923002: cc: Directly use property trees to calculate clip rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add setting to only calculate and verify in cc_unittest Created 4 years, 9 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
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 83c9c7586f3f5ce2e4790fa9bba1b8f14de862c3..8cd9c4d5bf3d713891a314561a8a4d30a463ccd2 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -80,6 +80,7 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs(
bool layers_always_allowed_lcd_text,
bool can_render_to_separate_surface,
bool can_adjust_raster_scales,
+ bool verify_clip_tree_calculations,
LayerImplList* render_surface_layer_list,
int current_render_surface_layer_list_id,
PropertyTrees* property_trees)
@@ -99,6 +100,7 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs(
layers_always_allowed_lcd_text(layers_always_allowed_lcd_text),
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),
render_surface_layer_list(render_surface_layer_list),
current_render_surface_layer_list_id(
current_render_surface_layer_list_id),
@@ -125,6 +127,7 @@ LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting::
false,
true,
false,
+ true,
render_surface_layer_list,
current_render_surface_layer_list_id,
GetPropertyTrees(root_layer)) {
@@ -1054,6 +1057,10 @@ void CalculateDrawPropertiesInternal(
subtree_visible_from_ancestor, inputs->can_render_to_separate_surface,
inputs->current_render_surface_layer_list_id, inputs->max_texture_size);
+ if (inputs->verify_clip_tree_calculations)
+ draw_property_utils::VerifyClipTreeCalculations(visible_layer_list,
+ inputs->property_trees);
+
if (should_measure_property_tree_performance) {
TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"),
"LayerTreeHostCommon::CalculateDrawProperties");

Powered by Google App Engine
This is Rietveld 408576698