summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_common.cc
diff options
context:
space:
mode:
authorajuma <ajuma@chromium.org>2015-10-21 06:06:32 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-21 13:07:11 +0000
commited5bee1d1a8b8a2e2c793d1118367537d05d7a23 (patch)
tree5347fa504f9561d1775c1b9a573a04ec86224edb /cc/trees/layer_tree_host_common.cc
parent8d6fcf60aef7e6ac90afed729cf6384a9f4719e9 (diff)
downloadchromium_src-ed5bee1d1a8b8a2e2c793d1118367537d05d7a23.zip
chromium_src-ed5bee1d1a8b8a2e2c793d1118367537d05d7a23.tar.gz
chromium_src-ed5bee1d1a8b8a2e2c793d1118367537d05d7a23.tar.bz2
cc: Make property trees support external viewports
This makes the clip tree get updated for changes to the viewport rect that happen on the compositor thread via calls to LTHI::SetExternalDrawConstraints (this is used by Android WebView). BUG=524106 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1413743005 Cr-Commit-Position: refs/heads/master@{#355278}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r--cc/trees/layer_tree_host_common.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 143c7b1..ccffb0f 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2708,6 +2708,9 @@ void CalculateDrawPropertiesAndVerify(
inputs->property_trees, inputs->page_scale_layer,
inputs->page_scale_factor, inputs->device_scale_factor,
inputs->device_transform);
+ // Similarly, the device viewport is shared between both trees.
+ inputs->property_trees->clip_tree.SetViewportClip(
+ gfx::RectF(gfx::SizeF(inputs->device_viewport_size)));
ComputeVisibleRectsUsingPropertyTrees(
inputs->root_layer, inputs->property_trees,
inputs->can_render_to_separate_surface, &update_layer_list);