Index: cc/trees/layer_tree_host_impl_unittest.cc |
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc |
index 604768ac581bf7f05f8d058aa193b5c0299bf014..404890d3d5c8ef68f6ea030602993e906015aaef 100644 |
--- a/cc/trees/layer_tree_host_impl_unittest.cc |
+++ b/cc/trees/layer_tree_host_impl_unittest.cc |
@@ -203,7 +203,7 @@ class LayerTreeHostImplTest : public testing::Test, |
host_impl_->SetVisible(true); |
bool init = host_impl_->InitializeRenderer(compositor_frame_sink_.get()); |
host_impl_->SetViewportSize(gfx::Size(10, 10)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
// Set the BeginFrameArgs so that methods which use it are able to. |
host_impl_->WillBeginImplFrame(CreateBeginFrameArgsForTesting( |
BEGINFRAME_FROM_HERE, |
@@ -1603,7 +1603,7 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoom) { |
// The impl-based pinch zoom should adjust the max scroll position. |
{ |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
@@ -1632,7 +1632,7 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoom) { |
// scroll deltas have the page scale factor applied. |
{ |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
@@ -1663,7 +1663,7 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoom) { |
TEST_F(LayerTreeHostImplTest, ViewportScrollOrder) { |
LayerTreeSettings settings = DefaultSettings(); |
CreateHostImpl(settings, CreateCompositorFrameSink()); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.25f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.25f, 4.f); |
const gfx::Size content_size(1000, 1000); |
const gfx::Size viewport_size(500, 500); |
@@ -1729,7 +1729,7 @@ TEST_F(LayerTreeHostImplTest, ViewportScrollOrder) { |
TEST_F(LayerTreeHostImplTest, ScrollViewportWithFractionalAmounts) { |
LayerTreeSettings settings = DefaultSettings(); |
CreateHostImpl(settings, CreateCompositorFrameSink()); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
const gfx::Size content_size(1000, 1000); |
const gfx::Size viewport_size(500, 500); |
@@ -1761,7 +1761,7 @@ TEST_F(LayerTreeHostImplTest, ScrollViewportWithFractionalAmounts) { |
inner_scroll_layer->CurrentScrollOffset()); |
host_impl_->ScrollEnd(EndState().get()); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 1.f, 2.f); |
// Now that we zoomed in, the scroll should be applied to the inner viewport. |
host_impl_->ScrollBegin(BeginState(gfx::Point(250, 250)).get(), |
@@ -1783,7 +1783,7 @@ TEST_F(LayerTreeHostImplTest, ScrollViewportWithFractionalAmounts) { |
TEST_F(LayerTreeHostImplTest, ScrollDuringPinchGesture) { |
LayerTreeSettings settings = DefaultSettings(); |
CreateHostImpl(settings, CreateCompositorFrameSink()); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
const gfx::Size content_size(1000, 1000); |
const gfx::Size viewport_size(500, 500); |
@@ -1844,7 +1844,7 @@ TEST_F(LayerTreeHostImplTest, ScrollDuringPinchGesture) { |
TEST_F(LayerTreeHostImplTest, PinchZoomSnapsToScreenEdge) { |
LayerTreeSettings settings = DefaultSettings(); |
CreateHostImpl(settings, CreateCompositorFrameSink()); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
const gfx::Size content_size(1000, 1000); |
const gfx::Size viewport_size(500, 500); |
@@ -1934,7 +1934,7 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoomWheelBubbleBetweenViewports) { |
float min_page_scale = 1.f, max_page_scale = 4.f; |
float page_scale_factor = 2.f; |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
// Scroll by a small amount, there should be no bubbling to the outer |
@@ -2113,8 +2113,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Basic pinch zoom in gesture |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
float page_scale_delta = 2.f; |
@@ -2135,8 +2135,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Zoom-in clamping |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
float page_scale_delta = 10.f; |
@@ -2154,8 +2154,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Zoom-out clamping |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
scroll_layer->layer_tree_impl() |
->property_trees() |
@@ -2182,8 +2182,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Two-finger panning should not happen based on pinch events only |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
scroll_layer->layer_tree_impl() |
->property_trees() |
@@ -2210,8 +2210,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Two-finger panning should work with interleaved scroll events |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
scroll_layer->layer_tree_impl() |
->property_trees() |
@@ -2241,7 +2241,8 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
// Two-finger panning should work when starting fully zoomed out. |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(0.5f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(0.5f, 1.f, 0.5f, |
+ 4.f); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
scroll_layer->layer_tree_impl() |
->property_trees() |
@@ -2295,8 +2296,8 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimation) { |
// Non-anchor zoom-in |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
scroll_layer->layer_tree_impl() |
->property_trees() |
->scroll_tree.UpdateScrollOffsetBaseForTesting( |
@@ -2353,8 +2354,8 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimation) { |
// Anchor zoom-out |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
scroll_layer->layer_tree_impl() |
->property_trees() |
->scroll_tree.UpdateScrollOffsetBaseForTesting( |
@@ -2420,8 +2421,8 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimationNoOp) { |
// Anchor zoom with unchanged page scale should not change scroll or scale. |
{ |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
scroll_layer->layer_tree_impl() |
->property_trees() |
->scroll_tree.UpdateScrollOffsetBaseForTesting( |
@@ -2458,7 +2459,7 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimationNoOp) { |
TEST_F(LayerTreeHostImplTest, PageScaleAnimationTransferedOnSyncTreeActivate) { |
host_impl_->CreatePendingTree(); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
CreateScrollAndContentsLayers( |
host_impl_->pending_tree(), |
gfx::Size(100, 100)); |
@@ -2471,8 +2472,8 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimationTransferedOnSyncTreeActivate) { |
float min_page_scale = 0.5f; |
float max_page_scale = 4.f; |
- host_impl_->sync_tree()->PushPageScaleFromMainThread(1.f, min_page_scale, |
- max_page_scale); |
+ host_impl_->sync_tree()->PushPageScaleFromMainThread( |
+ 1.f, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->ActivateSyncTree(); |
base::TimeTicks start_time = base::TimeTicks() + |
@@ -2594,7 +2595,7 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimationCompletedNotification) { |
BeginFrameArgs begin_frame_args = |
CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
scroll_layer->layer_tree_impl() |
->property_trees() |
->scroll_tree.UpdateScrollOffsetBaseForTesting(scroll_layer->id(), |
@@ -2627,7 +2628,7 @@ TEST_F(LayerTreeHostImplTest, PageScaleAnimationCompletedNotification) { |
TEST_F(LayerTreeHostImplTest, MaxScrollOffsetAffectedByBoundsDelta) { |
SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
DrawFrame(); |
@@ -2698,7 +2699,7 @@ class LayerTreeHostImplTestScrollbarAnimation : public LayerTreeHostImplTest { |
host_impl_->InitializeRenderer(compositor_frame_sink_.get()); |
SetupScrollAndContentsLayers(content_size); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 4.f); |
host_impl_->SetViewportSize( |
gfx::Size(content_size.width() / 2, content_size.height() / 2)); |
@@ -2877,7 +2878,7 @@ class LayerTreeHostImplTestScrollbarAnimation : public LayerTreeHostImplTest { |
EXPECT_TRUE(animation_task_.Equals(base::Closure())); |
// Changing page scale triggers scrollbar animation. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 4.f); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(1.1f); |
EXPECT_FALSE(did_request_next_frame_); |
EXPECT_FALSE(did_request_redraw_); |
@@ -2930,7 +2931,7 @@ class LayerTreeHostImplTestScrollbarOpacity : public LayerTreeHostImplTest { |
host_impl_->pending_tree()->InnerViewportContainerLayer(); |
scrollbar->SetScrollLayerId(scroll->id()); |
container->test_properties()->AddChild(std::move(scrollbar)); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
host_impl_->pending_tree()->BuildPropertyTreesForTesting(); |
host_impl_->ActivateSyncTree(); |
@@ -3238,7 +3239,7 @@ TEST_F(LayerTreeHostImplTest, MouseMoveAtWithDeviceScaleOf2) { |
TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) { |
SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
DrawFrame(); |
{ |
CompositorFrameMetadata metadata = |
@@ -3343,7 +3344,7 @@ TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) { |
// Likewise if set from the main thread. |
host_impl_->ProcessScrollDeltas(); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(4.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(4.f, 1.f, 0.5f, 4.f); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(4.f); |
{ |
CompositorFrameMetadata metadata = |
@@ -3869,7 +3870,7 @@ TEST_F(LayerTreeHostImplTest, ScrollRootIgnored) { |
TEST_F(LayerTreeHostImplTest, ClampingAfterActivation) { |
host_impl_->CreatePendingTree(); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
CreateScrollAndContentsLayers(host_impl_->pending_tree(), |
gfx::Size(100, 100)); |
host_impl_->pending_tree()->BuildPropertyTreesForTesting(); |
@@ -3911,7 +3912,8 @@ class LayerTreeHostImplBrowserControlsTest : public LayerTreeHostImplTest { |
if (init) { |
host_impl_->active_tree()->set_top_controls_height(top_controls_height_); |
host_impl_->active_tree()->SetCurrentBrowserControlsShownRatio(1.f); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, |
+ 1.f); |
} |
return init; |
} |
@@ -3935,7 +3937,7 @@ class LayerTreeHostImplBrowserControlsTest : public LayerTreeHostImplTest { |
tree_impl->set_browser_controls_shrink_blink_size(true); |
tree_impl->set_top_controls_height(top_controls_height_); |
tree_impl->SetCurrentBrowserControlsShownRatio(1.f); |
- tree_impl->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ tree_impl->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
host_impl_->DidChangeBrowserControlsPosition(); |
std::unique_ptr<LayerImpl> root = LayerImpl::Create(tree_impl, 1); |
@@ -4113,7 +4115,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest, |
// Need SetDrawsContent so ScrollBegin's hit test finds an actual layer. |
outer_scroll->SetDrawsContent(true); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 1.f, 2.f); |
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, |
host_impl_ |
@@ -4184,7 +4186,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest, FixedContainerDelta) { |
SetupBrowserControlsAndScrollLayerWithVirtualViewport( |
gfx::Size(100, 100), gfx::Size(100, 100), gfx::Size(100, 100)); |
DrawFrame(); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
float page_scale = 1.5f; |
LayerImpl* outer_viewport_scroll_layer = |
@@ -4192,7 +4194,8 @@ TEST_F(LayerTreeHostImplBrowserControlsTest, FixedContainerDelta) { |
// Zoom in, since the fixed container is the outer viewport, the delta should |
// not be scaled. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 1.f, |
+ 2.f); |
EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, |
host_impl_ |
@@ -4554,7 +4557,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest, |
TEST_F(LayerTreeHostImplBrowserControlsTest, BrowserControlsAspectRatio) { |
SetupBrowserControlsAndScrollLayerWithVirtualViewport( |
gfx::Size(100, 100), gfx::Size(200, 200), gfx::Size(200, 400)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 2.f); |
DrawFrame(); |
EXPECT_FLOAT_EQ(top_controls_height_, |
@@ -4741,7 +4744,7 @@ TEST_F(LayerTreeHostImplBrowserControlsTest, |
{ |
SetupBrowserControlsAndScrollLayerWithVirtualViewport( |
inner_viewport_size, outer_viewport_size, content_size); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
// Start off with the browser controls hidden on both main and impl. |
host_impl_->active_tree()->set_browser_controls_shrink_blink_size(false); |
@@ -5003,7 +5006,7 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnMainThread) { |
->parent->SetBounds(viewport_size); |
host_impl_->active_tree()->OuterViewportScrollLayer()->SetBounds( |
gfx::Size(40, 40)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
DrawFrame(); |
LayerImpl* root_scroll = |
@@ -5023,7 +5026,8 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnMainThread) { |
host_impl_->ScrollEnd(EndState().get()); |
// Set new page scale from main thread. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 1.f, |
+ 2.f); |
std::unique_ptr<ScrollAndScaleSet> scroll_info = |
host_impl_->ProcessScrollDeltas(); |
@@ -5051,7 +5055,7 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnImplThread) { |
->parent->SetBounds(viewport_size); |
host_impl_->active_tree()->OuterViewportScrollLayer()->SetBounds( |
gfx::Size(40, 40)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
DrawFrame(); |
@@ -5096,7 +5100,7 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnImplThread) { |
} |
TEST_F(LayerTreeHostImplTest, PageScaleDeltaAppliedToRootScrollLayerOnly) { |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 2.f); |
gfx::Size surface_size(10, 10); |
float default_page_scale = 1.f; |
gfx::Transform default_page_scale_matrix; |
@@ -5175,7 +5179,7 @@ TEST_F(LayerTreeHostImplTest, ScrollChildAndChangePageScaleOnMainThread) { |
host_impl_->ScrollEnd(EndState().get()); |
float page_scale = 2.f; |
- host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 1.f, |
page_scale); |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
@@ -5371,7 +5375,7 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutBubbling) { |
gfx::Vector2d(0, -3))); |
// Scrolling should be adjusted from viewport space. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 2.f, 2.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 2.f, 2.f, 2.f); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(2.f); |
scroll_delta = gfx::Vector2d(0, -2); |
@@ -5779,7 +5783,7 @@ TEST_F(LayerTreeHostImplTest, ScrollViewportRounding) { |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
host_impl_->active_tree()->SetDeviceScaleFactor(scale); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
LayerImpl* inner_viewport_scroll_layer = |
host_impl_->active_tree()->InnerViewportScrollLayer(); |
@@ -5884,7 +5888,7 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) { |
EXPECT_EQ(1.f, scroll_watcher.max_page_scale_factor()); |
// Put a page scale on the tree. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 0.5f, 4.f); |
EXPECT_EQ(1.f, scroll_watcher.page_scale_factor()); |
EXPECT_EQ(1.f, scroll_watcher.min_page_scale_factor()); |
EXPECT_EQ(1.f, scroll_watcher.max_page_scale_factor()); |
@@ -5941,7 +5945,7 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) { |
// sees the correct size of the new tree. |
gfx::Size new_size(42, 24); |
host_impl_->CreatePendingTree(); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
CreateScrollAndContentsLayers(host_impl_->pending_tree(), new_size); |
host_impl_->pending_tree()->BuildPropertyTreesForTesting(); |
host_impl_->ActivateSyncTree(); |
@@ -5996,7 +6000,7 @@ TEST_F(LayerTreeHostImplTest, OverscrollRoot) { |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
DrawFrame(); |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
@@ -6253,7 +6257,7 @@ TEST_F(LayerTreeHostImplTest, OverscrollAlways) { |
host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 0.5f, 4.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.5f, 4.f); |
DrawFrame(); |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
@@ -6474,7 +6478,7 @@ TEST_F(LayerTreeHostImplTest, ScrollChainingWithReplacedOuterViewport) { |
float min_page_scale = 1.f, max_page_scale = 4.f; |
float page_scale_factor = 2.f; |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
// Reset the parent scrolling layer (i.e. the current outer viewport) so that |
@@ -6596,7 +6600,7 @@ TEST_F(LayerTreeHostImplTest, RootScrollerScrollNonDescendant) { |
float min_page_scale = 1.f, max_page_scale = 4.f; |
float page_scale_factor = 1.f; |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
gfx::Vector2dF viewport_size_vec(viewport_size.width(), |
viewport_size.height()); |
@@ -7854,7 +7858,7 @@ TEST_F(LayerTreeHostImplTest, FarAwayQuadsDontNeedAA) { |
host_impl_->CreatePendingTree(); |
host_impl_->pending_tree()->SetDeviceScaleFactor(device_scale_factor); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f / 16.f, |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f / 16.f, |
16.f); |
std::unique_ptr<LayerImpl> scoped_root = |
@@ -10558,7 +10562,7 @@ TEST_F(LayerTreeHostImplTimelinesTest, ImplPinchZoomScrollAnimated) { |
float min_page_scale = 1.f, max_page_scale = 4.f; |
float page_scale_factor = 2.f; |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
// Scroll by a small amount, there should be no bubbling to the outer |
@@ -10647,7 +10651,7 @@ TEST_F(LayerTreeHostImplTimelinesTest, ImplPinchZoomScrollAnimatedUpdate) { |
float min_page_scale = 1.f, max_page_scale = 4.f; |
float page_scale_factor = 2.f; |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
// Scroll the inner viewport. |
@@ -10893,7 +10897,7 @@ TEST_F(LayerTreeHostImplTest, WheelScrollWithPageScaleFactorOnInnerLayer) { |
// The scroll deltas should have the page scale factor applied. |
{ |
host_impl_->active_tree()->PushPageScaleFromMainThread( |
- page_scale_factor, min_page_scale, max_page_scale); |
+ page_scale_factor, min_page_scale, min_page_scale, max_page_scale); |
host_impl_->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
SetScrollOffsetDelta(scroll_layer, gfx::Vector2d()); |
@@ -11342,7 +11346,7 @@ TEST_F(LayerTreeHostImplTest, UpdatePageScaleFactorOnActiveTree) { |
// Check page scale factor update in property trees when an update is made |
// on the active tree. |
host_impl_->CreatePendingTree(); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 3.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 3.f); |
CreateScrollAndContentsLayers(host_impl_->pending_tree(), |
gfx::Size(100, 100)); |
host_impl_->pending_tree()->BuildPropertyTreesForTesting(); |
@@ -11383,7 +11387,7 @@ TEST_F(LayerTreeHostImplTest, UpdatePageScaleFactorOnActiveTree) { |
TEST_F(LayerTreeHostImplTest, SubLayerScaleForNodeInSubtreeOfPageScaleLayer) { |
// Checks that the sublayer scale of a transform node in the subtree of the |
// page scale layer is updated without a property tree rebuild. |
- host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 3.f); |
+ host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 3.f); |
CreateScrollAndContentsLayers(host_impl_->active_tree(), gfx::Size(100, 100)); |
LayerImpl* page_scale_layer = host_impl_->active_tree()->PageScaleLayer(); |
page_scale_layer->test_properties()->AddChild( |
@@ -11420,7 +11424,7 @@ TEST_F(LayerTreeHostImplTest, JitterTest) { |
gfx::Size(100, 100)); |
host_impl_->pending_tree()->BuildPropertyTreesForTesting(); |
- host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
const int scroll = 5; |
int accumulated_scroll = 0; |
for (int i = 0; i < host_impl_->pending_tree()->kFixedPointHitsThreshold + 1; |
@@ -11446,7 +11450,7 @@ TEST_F(LayerTreeHostImplTest, JitterTest) { |
content_layer->test_properties()->transform = translate; |
LayerTreeImpl* pending_tree = host_impl_->pending_tree(); |
- pending_tree->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
+ pending_tree->PushPageScaleFromMainThread(1.f, 1.f, 1.f, 1.f); |
LayerImpl* last_scrolled_layer = pending_tree->LayerById( |
host_impl_->active_tree()->InnerViewportScrollLayer()->id()); |