| Index: cc/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
|
| index 859c9b72198d8d8548d79ff55f56ae7b8e4474b9..939889511cc317341a5ef04d3b9757f379e46aad 100644
|
| --- a/cc/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/layer_tree_host_impl_unittest.cc
|
| @@ -48,6 +48,7 @@ using namespace LayerTestCommon;
|
| using namespace WebKit;
|
| using namespace WebKitTests;
|
|
|
| +using gfx::Transform;
|
| using media::VideoFrame;
|
| using ::testing::Mock;
|
| using ::testing::Return;
|
| @@ -552,7 +553,7 @@ TEST_P(LayerTreeHostImplTest, implPinchZoom)
|
| DCHECK(scrollLayer);
|
|
|
| const float minPageScale = 1, maxPageScale = 4;
|
| - const WebTransformationMatrix identityScaleTransform;
|
| + const Transform identityScaleTransform;
|
|
|
| // The impl-based pinch zoom should not adjust the max scroll position.
|
| {
|
| @@ -606,7 +607,7 @@ TEST_P(LayerTreeHostImplTest, pinchGesture)
|
|
|
| const float minPageScale = m_hostImpl->settings().pageScalePinchZoomEnabled ? 1 : 0.5;
|
| const float maxPageScale = 4;
|
| - const WebTransformationMatrix identityScaleTransform;
|
| + const Transform identityScaleTransform;
|
|
|
| // Basic pinch zoom in gesture
|
| {
|
| @@ -718,7 +719,7 @@ TEST_P(LayerTreeHostImplTest, pageScaleAnimation)
|
| const base::TimeDelta duration = base::TimeDelta::FromMilliseconds(100);
|
| const base::TimeTicks halfwayThroughAnimation = startTime + duration / 2;
|
| const base::TimeTicks endTime = startTime + duration;
|
| - const WebTransformationMatrix identityScaleTransform;
|
| + const Transform identityScaleTransform;
|
|
|
| // Non-anchor zoom-in
|
| {
|
| @@ -1180,8 +1181,8 @@ TEST_P(LayerTreeHostImplTest, scrollMissesBackfacingChild)
|
| scoped_ptr<LayerImpl> child = createScrollableLayer(2, surfaceSize);
|
| m_hostImpl->setViewportSize(surfaceSize, surfaceSize);
|
|
|
| - WebTransformationMatrix matrix;
|
| - matrix.rotate3d(180, 0, 0);
|
| + Transform matrix;
|
| + MathUtil::rotateEulerAngles(&matrix, 180, 0, 0);
|
| child->setTransform(matrix);
|
| child->setDoubleSided(false);
|
|
|
| @@ -1244,7 +1245,7 @@ TEST_P(LayerTreeHostImplTest, scrollRootAndChangePageScaleOnMainThread)
|
| EXPECT_EQ(m_hostImpl->rootLayer()->maxScrollOffset(), expectedMaxScroll);
|
|
|
| // The page scale delta remains constant because the impl thread did not scale.
|
| - EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), WebTransformationMatrix());
|
| + EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), Transform());
|
| }
|
|
|
| TEST_P(LayerTreeHostImplTest, scrollRootAndChangePageScaleOnImplThread)
|
| @@ -1278,8 +1279,8 @@ TEST_P(LayerTreeHostImplTest, scrollRootAndChangePageScaleOnImplThread)
|
| EXPECT_EQ(m_hostImpl->rootLayer()->maxScrollOffset(), expectedMaxScroll);
|
|
|
| // The page scale delta should match the new scale on the impl side.
|
| - WebTransformationMatrix expectedScale;
|
| - expectedScale.scale(pageScale);
|
| + Transform expectedScale;
|
| + expectedScale.PreconcatScale(pageScale, pageScale);
|
| EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), expectedScale);
|
| }
|
|
|
| @@ -1287,11 +1288,11 @@ TEST_P(LayerTreeHostImplTest, pageScaleDeltaAppliedToRootScrollLayerOnly)
|
| {
|
| gfx::Size surfaceSize(10, 10);
|
| float defaultPageScale = 1;
|
| - WebTransformationMatrix defaultPageScaleMatrix;
|
| + Transform defaultPageScaleMatrix;
|
|
|
| float newPageScale = 2;
|
| - WebTransformationMatrix newPageScaleMatrix;
|
| - newPageScaleMatrix.scale(newPageScale);
|
| + Transform newPageScaleMatrix;
|
| + newPageScaleMatrix.PreconcatScale(newPageScale, newPageScale);
|
|
|
| // Create a normal scrollable root layer and another scrollable child layer.
|
| setupScrollAndContentsLayers(surfaceSize);
|
| @@ -1320,12 +1321,12 @@ TEST_P(LayerTreeHostImplTest, pageScaleDeltaAppliedToRootScrollLayerOnly)
|
| m_hostImpl->drawLayers(frame);
|
| m_hostImpl->didDrawAllLayers(frame);
|
|
|
| - EXPECT_EQ(root->drawTransform().m11(), newPageScale);
|
| - EXPECT_EQ(root->drawTransform().m22(), newPageScale);
|
| - EXPECT_EQ(child->drawTransform().m11(), newPageScale);
|
| - EXPECT_EQ(child->drawTransform().m22(), newPageScale);
|
| - EXPECT_EQ(grandChild->drawTransform().m11(), newPageScale);
|
| - EXPECT_EQ(grandChild->drawTransform().m22(), newPageScale);
|
| + EXPECT_EQ(root->drawTransform().matrix().getDouble(0, 0), newPageScale);
|
| + EXPECT_EQ(root->drawTransform().matrix().getDouble(1, 1), newPageScale);
|
| + EXPECT_EQ(child->drawTransform().matrix().getDouble(0, 0), newPageScale);
|
| + EXPECT_EQ(child->drawTransform().matrix().getDouble(1, 1), newPageScale);
|
| + EXPECT_EQ(grandChild->drawTransform().matrix().getDouble(0, 0), newPageScale);
|
| + EXPECT_EQ(grandChild->drawTransform().matrix().getDouble(1, 1), newPageScale);
|
| }
|
|
|
| TEST_P(LayerTreeHostImplTest, scrollChildAndChangePageScaleOnMainThread)
|
| @@ -1367,8 +1368,8 @@ TEST_P(LayerTreeHostImplTest, scrollChildAndChangePageScaleOnMainThread)
|
| EXPECT_EQ(child->maxScrollOffset(), expectedMaxScroll);
|
|
|
| // The page scale delta remains constant because the impl thread did not scale.
|
| - WebTransformationMatrix identityTransform;
|
| - EXPECT_EQ(child->implTransform(), WebTransformationMatrix());
|
| + Transform identityTransform;
|
| + EXPECT_EQ(child->implTransform(), Transform());
|
| }
|
|
|
| TEST_P(LayerTreeHostImplTest, scrollChildBeyondLimit)
|
| @@ -1456,8 +1457,8 @@ TEST_P(LayerTreeHostImplTest, scrollAxisAlignedRotatedLayer)
|
| setupScrollAndContentsLayers(gfx::Size(100, 100));
|
|
|
| // Rotate the root layer 90 degrees counter-clockwise about its center.
|
| - WebTransformationMatrix rotateTransform;
|
| - rotateTransform.rotate(-90);
|
| + Transform rotateTransform;
|
| + rotateTransform.PreconcatRotate(-90);
|
| m_hostImpl->rootLayer()->setTransform(rotateTransform);
|
|
|
| gfx::Size surfaceSize(50, 50);
|
| @@ -1494,10 +1495,10 @@ TEST_P(LayerTreeHostImplTest, scrollNonAxisAlignedRotatedLayer)
|
|
|
| // Create a child layer that is rotated to a non-axis-aligned angle.
|
| scoped_ptr<LayerImpl> child = createScrollableLayer(childLayerId, m_hostImpl->rootLayer()->contentBounds());
|
| - WebTransformationMatrix rotateTransform;
|
| - rotateTransform.translate(-50, -50);
|
| - rotateTransform.rotate(childLayerAngle);
|
| - rotateTransform.translate(50, 50);
|
| + Transform rotateTransform;
|
| + rotateTransform.PreconcatTranslate(-50, -50);
|
| + rotateTransform.PreconcatRotate(childLayerAngle);
|
| + rotateTransform.PreconcatTranslate(50, 50);
|
| child->setTransform(rotateTransform);
|
|
|
| // Only allow vertical scrolling.
|
| @@ -1553,8 +1554,8 @@ TEST_P(LayerTreeHostImplTest, scrollScaledLayer)
|
|
|
| // Scale the layer to twice its normal size.
|
| int scale = 2;
|
| - WebTransformationMatrix scaleTransform;
|
| - scaleTransform.scale(scale);
|
| + Transform scaleTransform;
|
| + scaleTransform.PreconcatScale(scale, scale);
|
| m_hostImpl->rootLayer()->setTransform(scaleTransform);
|
|
|
| gfx::Size surfaceSize(50, 50);
|
| @@ -2747,9 +2748,9 @@ static inline scoped_ptr<RenderPass> createRenderPassWithResource(ResourceProvid
|
| ResourceProvider::ResourceId resourceId = provider->createResource(0, gfx::Size(1, 1), GL_RGBA, ResourceProvider::TextureUsageAny);
|
|
|
| scoped_ptr<TestRenderPass> pass = TestRenderPass::Create();
|
| - pass->SetNew(RenderPass::Id(1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), WebTransformationMatrix());
|
| + pass->SetNew(RenderPass::Id(1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), Transform());
|
| scoped_ptr<SharedQuadState> sharedState = SharedQuadState::Create();
|
| - sharedState->SetAll(WebTransformationMatrix(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), false, 1);
|
| + sharedState->SetAll(Transform(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), false, 1);
|
| scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
|
| quad->SetNew(sharedState.get(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), resourceId, false, gfx::RectF(0, 0, 1, 1), false);
|
|
|
| @@ -3169,10 +3170,10 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithClipping)
|
|
|
| // Rotation will put part of the child ouside the bounds of the root layer.
|
| // Nevertheless, the child layers should be drawn.
|
| - WebTransformationMatrix transform = surfaceLayerPtr->transform();
|
| - transform.translate(50, 50);
|
| - transform.rotate(35);
|
| - transform.translate(-50, -50);
|
| + Transform transform = surfaceLayerPtr->transform();
|
| + transform.PreconcatTranslate(50, 50);
|
| + transform.PreconcatRotate(35);
|
| + transform.PreconcatTranslate(-50, -50);
|
| surfaceLayerPtr->setTransform(transform);
|
|
|
| {
|
| @@ -3203,9 +3204,9 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithClipping)
|
| }
|
|
|
| transform = surfaceLayerPtr->transform();
|
| - transform.translate(50, 50);
|
| - transform.rotate(-35);
|
| - transform.translate(-50, -50);
|
| + transform.PreconcatTranslate(50, 50);
|
| + transform.PreconcatRotate(-35);
|
| + transform.PreconcatTranslate(-50, -50);
|
| surfaceLayerPtr->setTransform(transform);
|
|
|
| // The surface is now aligned again, and the clipped parts are exposed.
|
| @@ -3298,8 +3299,8 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusion)
|
| // "Unocclude" surface S1 and repeat draw.
|
| // Must remove S2's render pass since it's cached;
|
| // Must keep S1 quads because texture contained external occlusion.
|
| - WebTransformationMatrix transform = layerS2Ptr->transform();
|
| - transform.translate(150, 150);
|
| + Transform transform = layerS2Ptr->transform();
|
| + transform.PreconcatTranslate(150, 150);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3322,7 +3323,7 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusion)
|
| // Must remove S1's render pass since it is now available in full.
|
| // S2 has no change so must also be removed.
|
| transform = layerS2Ptr->transform();
|
| - transform.translate(-15, -15);
|
| + transform.PreconcatTranslate(-15, -15);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3413,8 +3414,8 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionEarlyOut)
|
| // "Unocclude" surface S1 and repeat draw.
|
| // Must remove S2's render pass since it's cached;
|
| // Must keep S1 quads because texture contained external occlusion.
|
| - WebTransformationMatrix transform = layerS2Ptr->transform();
|
| - transform.translate(100, 100);
|
| + Transform transform = layerS2Ptr->transform();
|
| + transform.PreconcatTranslate(100, 100);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3437,7 +3438,7 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionEarlyOut)
|
| // Must remove S1's render pass since it is now available in full.
|
| // S2 has no change so must also be removed.
|
| transform = layerS2Ptr->transform();
|
| - transform.translate(-15, -15);
|
| + transform.PreconcatTranslate(-15, -15);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3519,8 +3520,8 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionExternalOverInternal)
|
| // "Unocclude" surface S1 and repeat draw.
|
| // Must remove S2's render pass since it's cached;
|
| // Must keep S1 quads because texture contained external occlusion.
|
| - WebTransformationMatrix transform = layerS2Ptr->transform();
|
| - transform.translate(300, 0);
|
| + Transform transform = layerS2Ptr->transform();
|
| + transform.PreconcatTranslate(300, 0);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3573,10 +3574,10 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionExternalNotAligned)
|
|
|
| addDrawingLayerTo(rootPtr, 2, gfx::Rect(0, 0, 400, 400), &layerS1Ptr);
|
| layerS1Ptr->setForceRenderSurface(true);
|
| - WebTransformationMatrix transform = layerS1Ptr->transform();
|
| - transform.translate(200, 200);
|
| - transform.rotate(45);
|
| - transform.translate(-200, -200);
|
| + Transform transform = layerS1Ptr->transform();
|
| + transform.PreconcatTranslate(200, 200);
|
| + transform.PreconcatRotate(45);
|
| + transform.PreconcatTranslate(-200, -200);
|
| layerS1Ptr->setTransform(transform);
|
|
|
| addDrawingLayerTo(layerS1Ptr, 3, gfx::Rect(200, 0, 200, 400), 0); // L11
|
| @@ -3686,8 +3687,8 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionPartialSwap)
|
| // "Unocclude" surface S1 and repeat draw.
|
| // Must remove S2's render pass since it's cached;
|
| // Must keep S1 quads because texture contained external occlusion.
|
| - WebTransformationMatrix transform = layerS2Ptr->transform();
|
| - transform.translate(150, 150);
|
| + Transform transform = layerS2Ptr->transform();
|
| + transform.PreconcatTranslate(150, 150);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3710,7 +3711,7 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithOcclusionPartialSwap)
|
| // Must remove S1's render pass since it is now available in full.
|
| // S2 has no change so must also be removed.
|
| transform = layerS2Ptr->transform();
|
| - transform.translate(-15, -15);
|
| + transform.PreconcatTranslate(-15, -15);
|
| layerS2Ptr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -3968,8 +3969,8 @@ TEST_P(LayerTreeHostImplTest, surfaceTextureCaching)
|
| }
|
|
|
| // Change location of the intermediate layer
|
| - WebTransformationMatrix transform = intermediateLayerPtr->transform();
|
| - transform.setM41(1.0001);
|
| + Transform transform = intermediateLayerPtr->transform();
|
| + transform.matrix().setDouble(0, 3, 1.0001);
|
| intermediateLayerPtr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -4129,8 +4130,8 @@ TEST_P(LayerTreeHostImplTest, surfaceTextureCachingNoPartialSwap)
|
| }
|
|
|
| // Change location of the intermediate layer
|
| - WebTransformationMatrix transform = intermediateLayerPtr->transform();
|
| - transform.setM41(1.0001);
|
| + Transform transform = intermediateLayerPtr->transform();
|
| + transform.matrix().setDouble(0, 3, 1.0001);
|
| intermediateLayerPtr->setTransform(transform);
|
| {
|
| LayerTreeHostImpl::FrameData frame;
|
| @@ -4224,14 +4225,14 @@ static void configureRenderPassTestData(const char* testScript, RenderPassRemova
|
|
|
| // One shared state for all quads - we don't need the correct details
|
| testData.sharedQuadState = SharedQuadState::Create();
|
| - testData.sharedQuadState->SetAll(WebTransformationMatrix(), gfx::Rect(), gfx::Rect(), gfx::Rect(), false, 1.0);
|
| + testData.sharedQuadState->SetAll(Transform(), gfx::Rect(), gfx::Rect(), gfx::Rect(), false, 1.0);
|
|
|
| const char* currentChar = testScript;
|
|
|
| // Pre-create root pass
|
| RenderPass::Id rootRenderPassId = RenderPass::Id(testScript[0], testScript[1]);
|
| scoped_ptr<TestRenderPass> pass = TestRenderPass::Create();
|
| - pass->SetNew(rootRenderPassId, gfx::Rect(), gfx::Rect(), WebTransformationMatrix());
|
| + pass->SetNew(rootRenderPassId, gfx::Rect(), gfx::Rect(), Transform());
|
| testData.renderPassCache.add(rootRenderPassId, pass.Pass());
|
| while (*currentChar) {
|
| int layerId = *currentChar;
|
| @@ -4291,7 +4292,7 @@ static void configureRenderPassTestData(const char* testScript, RenderPassRemova
|
| renderer->setHaveCachedResourcesForRenderPassId(newRenderPassId);
|
|
|
| scoped_ptr<TestRenderPass> pass = TestRenderPass::Create();
|
| - pass->SetNew(newRenderPassId, gfx::Rect(), gfx::Rect(), WebTransformationMatrix());
|
| + pass->SetNew(newRenderPassId, gfx::Rect(), gfx::Rect(), Transform());
|
| testData.renderPassCache.add(newRenderPassId, pass.Pass());
|
| }
|
|
|
| @@ -4538,8 +4539,8 @@ void LayerTreeHostImplTest::pinchZoomPanViewportForcesCommitRedraw(const float d
|
| m_hostImpl->pinchGestureEnd();
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| - WebTransformationMatrix expectedImplTransform;
|
| - expectedImplTransform.scale(pageScale);
|
| + Transform expectedImplTransform;
|
| + expectedImplTransform.PreconcatScale(pageScale, pageScale);
|
|
|
| // Verify the pinch zoom took place.
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
| @@ -4610,8 +4611,8 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
|
| m_hostImpl->pinchGestureEnd();
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| - WebTransformationMatrix expectedImplTransform;
|
| - expectedImplTransform.scale(pageScale);
|
| + Transform expectedImplTransform;
|
| + expectedImplTransform.PreconcatScale(pageScale, pageScale);
|
|
|
| EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), expectedImplTransform);
|
|
|
| @@ -4628,7 +4629,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| gfx::Vector2dF expectedTranslation = gfx::ScaleVector2d(scrollDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
| // No change expected.
|
| @@ -4645,7 +4646,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| expectedTranslation = gfx::ScaleVector2d(scrollDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
| // No change expected.
|
| @@ -4690,8 +4691,8 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
|
| m_hostImpl->pinchGestureEnd();
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| - WebTransformationMatrix expectedImplTransform;
|
| - expectedImplTransform.scale(pageScale);
|
| + Transform expectedImplTransform;
|
| + expectedImplTransform.PreconcatScale(pageScale, pageScale);
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
|
|
| @@ -4727,7 +4728,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
|
|
|
| gfx::Vector2d expectedPanDelta(scrollDelta);
|
| gfx::Vector2dF expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), expectedImplTransform);
|
|
|
| @@ -4762,7 +4763,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
|
|
|
| expectedPanDelta = scrollDelta;
|
| expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
|
|
| @@ -4809,8 +4810,8 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
|
| m_hostImpl->pinchGestureEnd();
|
| m_hostImpl->updateRootScrollLayerImplTransform();
|
|
|
| - WebTransformationMatrix expectedImplTransform;
|
| - expectedImplTransform.scale(pageScale);
|
| + Transform expectedImplTransform;
|
| + expectedImplTransform.PreconcatScale(pageScale, pageScale);
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
|
|
| @@ -4836,7 +4837,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
|
|
|
| gfx::Vector2d expectedPanDelta(2, 0); // This component gets handled by zoomViewport pan.
|
| gfx::Vector2dF expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(m_hostImpl->rootLayer()->implTransform(), expectedImplTransform);
|
|
|
| @@ -4855,7 +4856,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
|
|
|
| expectedPanDelta = gfx::Vector2d(0, 1);
|
| expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
|
| - expectedImplTransform.translate(-expectedTranslation.x(), -expectedTranslation.y());
|
| + expectedImplTransform.PreconcatTranslate(-expectedTranslation.x(), -expectedTranslation.y());
|
|
|
| EXPECT_EQ(expectedImplTransform, m_hostImpl->rootLayer()->implTransform());
|
| }
|
|
|