summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_common.cc
diff options
context:
space:
mode:
authorajuma <ajuma@chromium.org>2015-10-19 12:43:58 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-19 19:45:09 +0000
commit51d73f712c256fa9e6e5bb320eac2ec7ba7b92a3 (patch)
treee48ed3f651822b9c9939b3d50f90f993c56ed0e0 /cc/trees/layer_tree_host_common.cc
parent83c8c73f9f88d6caa274ad9733723efecfd14de9 (diff)
downloadchromium_src-51d73f712c256fa9e6e5bb320eac2ec7ba7b92a3.zip
chromium_src-51d73f712c256fa9e6e5bb320eac2ec7ba7b92a3.tar.gz
chromium_src-51d73f712c256fa9e6e5bb320eac2ec7ba7b92a3.tar.bz2
cc: Make property trees support resourceless draw mode
Property trees currently rely on render target information computed at tree-building time (on the main thread) when computing draw properties. However, in resourceless draw mode (used by Android WebView), only the root render surface is used. Since resourceless draw mode can be arbitrarily enabled and disabled on the compositor thread, we cannot know at tree building time whether it will be used. This CL makes property trees support resourceless draw mode without requiring trees to be rebuilt when the draw mode changes (though they do still need to be updated). Most of the changes are for computing clipping-related properties, since render surfaces change the way clips are propagated to descendants and also change the space in which drawable_content_rect and clip_rect are expressed. BUG=524106 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1387003002 Cr-Commit-Position: refs/heads/master@{#354831}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r--cc/trees/layer_tree_host_common.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 51679c5..02e1d0c 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2695,7 +2695,8 @@ void CalculateDrawPropertiesAndVerify(
inputs->outer_viewport_scroll_layer, inputs->page_scale_factor,
inputs->device_scale_factor,
gfx::Rect(inputs->device_viewport_size), inputs->device_transform,
- inputs->property_trees, &update_layer_list);
+ inputs->can_render_to_separate_surface, inputs->property_trees,
+ &update_layer_list);
if (should_measure_property_tree_performance) {
TRACE_EVENT_END0(
@@ -2718,7 +2719,8 @@ void CalculateDrawPropertiesAndVerify(
inputs->page_scale_factor, inputs->device_scale_factor,
inputs->device_transform);
ComputeVisibleRectsUsingPropertyTrees(
- inputs->root_layer, inputs->property_trees, &update_layer_list);
+ inputs->root_layer, inputs->property_trees,
+ inputs->can_render_to_separate_surface, &update_layer_list);
break;
}
}
@@ -2762,7 +2764,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
inputs->inner_viewport_scroll_layer, inputs->outer_viewport_scroll_layer,
inputs->page_scale_factor, inputs->device_scale_factor,
gfx::Rect(inputs->device_viewport_size), inputs->device_transform,
- property_trees, &update_layer_list);
+ can_render_to_separate_surface, property_trees, &update_layer_list);
}
void LayerTreeHostCommon::CalculateDrawProperties(