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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2655233006: cc : Clean up cc clip tree (Closed)
Patch Set: blink_tests Created 3 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 2e4ded747af48204387514f00a2bb43fefab4da7..f49efe6ac85e447924ed6d558e4748d94f9a2cb9 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -80,8 +80,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs(
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,
LayerImplList* render_surface_layer_list,
PropertyTrees* property_trees)
: root_layer(root_layer),
@@ -98,8 +96,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputs::CalcDrawPropsImplInputs(
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),
render_surface_layer_list(render_surface_layer_list),
property_trees(property_trees) {}
@@ -122,8 +118,6 @@ LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting::
std::numeric_limits<int>::max() / 2,
true,
false,
- true,
- true,
render_surface_layer_list,
GetPropertyTrees(root_layer)) {
DCHECK(root_layer);
@@ -477,15 +471,20 @@ void CalculateDrawPropertiesInternal(
"LayerTreeHostCommon::ComputeVisibleRectsWithPropertyTrees");
}
- draw_property_utils::BuildPropertyTreesAndComputeVisibleRects(
+ PropertyTreeBuilder::BuildPropertyTrees(
inputs->root_layer, inputs->page_scale_layer,
inputs->inner_viewport_scroll_layer,
inputs->outer_viewport_scroll_layer,
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);
+ draw_property_utils::UpdatePropertyTreesAndRenderSurfaces(
+ inputs->root_layer, inputs->property_trees,
+ inputs->can_render_to_separate_surface);
+ draw_property_utils::FindLayersThatNeedUpdates(
+ inputs->root_layer->layer_tree_impl(), 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
@@ -529,9 +528,12 @@ void CalculateDrawPropertiesInternal(
property_trees->transform_tree.SetRootTransformsAndScales(
inputs->device_scale_factor, page_scale_factor_for_root,
inputs->device_transform, inputs->root_layer->position());
- draw_property_utils::ComputeVisibleRects(
+ draw_property_utils::UpdatePropertyTreesAndRenderSurfaces(
inputs->root_layer, inputs->property_trees,
- inputs->can_render_to_separate_surface, &visible_layer_list);
+ inputs->can_render_to_separate_surface);
+ draw_property_utils::FindLayersThatNeedUpdates(
+ inputs->root_layer->layer_tree_impl(), inputs->property_trees,
+ &visible_layer_list);
break;
}
}
@@ -553,12 +555,6 @@ 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 (inputs->verify_visible_rect_calculations)
- draw_property_utils::VerifyVisibleRectsCalculations(visible_layer_list,
- inputs->property_trees);
if (should_measure_property_tree_performance) {
TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"),

Powered by Google App Engine
This is Rietveld 408576698