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

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: fix perftests compile by not verify clip tree calc there Created 4 years, 7 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/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_perftest.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 5a682de7289edc0a19529adbf17e84a0a43938e8..94f360fcb9c7d2dfdf119758393c65d27a25e81f 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -82,6 +82,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,
PropertyTrees* property_trees)
: root_layer(root_layer),
@@ -100,6 +101,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),
property_trees(property_trees) {}
@@ -123,6 +125,7 @@ LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting::
false,
true,
false,
+ true,
render_surface_layer_list,
GetPropertyTrees(root_layer)) {
DCHECK(root_layer);
@@ -607,6 +610,10 @@ void CalculateDrawPropertiesInternal(
inputs->render_surface_layer_list, inputs->can_render_to_separate_surface,
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");
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698