From 58eec0810c6412fb9debb83754bd0e5a65cecdc6 Mon Sep 17 00:00:00 2001 From: aelias Date: Wed, 3 Dec 2014 17:04:40 -0800 Subject: Refactor delta/sent_delta logic into self-contained abstraction. This patch updates page scale to use a new SyncedProperty abstraction. This is shared between the pending and active trees and contains all page scale state on the impl side except for the min/max limits. Its API only exposes those operations that are encouraged: for example, the raw main-thread originating value can no longer be used by accident. This patch should be a no-op. In future patches, I intend to make scroll offsets and top controls use this abstraction as well. NOTRY=true BUG= Review URL: https://codereview.chromium.org/764483002 Cr-Commit-Position: refs/heads/master@{#306736} --- cc/trees/layer_tree_impl_unittest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cc/trees/layer_tree_impl_unittest.cc') diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc index 52f8e0a..2131d4c 100644 --- a/cc/trees/layer_tree_impl_unittest.cc +++ b/cc/trees/layer_tree_impl_unittest.cc @@ -1795,8 +1795,9 @@ TEST_F(LayerTreeImplTest, host_impl().SetViewportSize(scaled_bounds_for_root); host_impl().SetDeviceScaleFactor(device_scale_factor); - host_impl().active_tree()->SetPageScaleFactorAndLimits( + host_impl().active_tree()->PushPageScaleFromMainThread( page_scale_factor, page_scale_factor, page_scale_factor); + host_impl().SetPageScaleOnActiveTree(page_scale_factor); host_impl().active_tree()->SetRootLayer(root.Pass()); host_impl().active_tree()->SetViewportLayersFromIds(Layer::INVALID_ID, 1, 1, Layer::INVALID_ID); @@ -2299,8 +2300,9 @@ TEST_F(LayerTreeImplTest, SelectionBoundsForScaledLayers) { host_impl().SetViewportSize(scaled_bounds_for_root); host_impl().SetDeviceScaleFactor(device_scale_factor); - host_impl().active_tree()->SetPageScaleFactorAndLimits( + host_impl().active_tree()->PushPageScaleFromMainThread( page_scale_factor, page_scale_factor, page_scale_factor); + host_impl().SetPageScaleOnActiveTree(page_scale_factor); host_impl().active_tree()->SetRootLayer(root.Pass()); host_impl().active_tree()->SetViewportLayersFromIds(Layer::INVALID_ID, 1, 1, Layer::INVALID_ID); -- cgit v1.1