From 0c1fd60a253036b1add346cbacc306eac30c6eaf Mon Sep 17 00:00:00 2001 From: jaydasika Date: Wed, 7 Oct 2015 10:59:52 -0700 Subject: 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} --- cc/trees/layer_tree_host_common.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '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 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; -- cgit v1.1