summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_common.cc
diff options
context:
space:
mode:
authorjaydasika <jaydasika@chromium.org>2015-10-07 10:59:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-07 18:01:28 +0000
commit0c1fd60a253036b1add346cbacc306eac30c6eaf (patch)
tree5c28bcb03f06f5519479edbb2b62e26a802dcede /cc/trees/layer_tree_host_common.cc
parente11579c50dd772ee08d969dd4d54bae4b064999a (diff)
downloadchromium_src-0c1fd60a253036b1add346cbacc306eac30c6eaf.zip
chromium_src-0c1fd60a253036b1add346cbacc306eac30c6eaf.tar.gz
chromium_src-0c1fd60a253036b1add346cbacc306eac30c6eaf.tar.bz2
Update page scale factor in property before calling ComputeVisibleRects
When page scale factor is updated directly on the active tree using LayerTreeImpl::SetPageScaleOnActiveTree, the property trees on pending tree are not updated. At this point, if we compute draw properties on pending tree, there is a mismatch between the properties computed from property trees and CDP because CDP uses the new value (as page scale factor itself is a synced property) and pending tree property trees use the old value. This CL updates page scale factor in property trees before we call ComputeVisibleRectsUsingPropertyTrees. BUG=538624 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1382353004 Cr-Commit-Position: refs/heads/master@{#352888}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r--cc/trees/layer_tree_host_common.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 2d2bd3e..21054ff 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2709,6 +2709,13 @@ void CalculateDrawPropertiesAndVerify(
TRACE_EVENT0(
TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"),
"LayerTreeHostCommon::ComputeJustVisibleRectsWithPropertyTrees");
+ // Since page scale is a SyncedProperty, changes to page scale on the
+ // active tree immediately affect the pending tree, so instead of
+ // trying to update property trees whenever page scale changes, we
+ // update their page scale before using them.
+ UpdatePageScaleFactorInPropertyTrees(inputs->property_trees,
+ inputs->page_scale_layer,
+ inputs->page_scale_factor);
ComputeVisibleRectsUsingPropertyTrees(
inputs->root_layer, inputs->property_trees, &update_layer_list);
break;