| Index: cc/trees/layer_tree_host_unittest_picture.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
|
| index ec3d99d6210d3fc7bd7d294eecc70eb096e77844..77453046c047d4e7c9fc655fd3dc42d50794fa53 100644
|
| --- a/cc/trees/layer_tree_host_unittest_picture.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_picture.cc
|
| @@ -452,19 +452,22 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
|
| case 0:
|
| // On 1st commit the pending layer has tilings.
|
| ASSERT_EQ(1u, picture->tilings()->num_tilings());
|
| - EXPECT_EQ(1.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(),
|
| + picture->tilings()->tiling_at(0)->raster_transform());
|
| break;
|
| case 1:
|
| // On 2nd commit, the pending layer is transparent, so has a stale
|
| // value.
|
| ASSERT_EQ(1u, picture->tilings()->num_tilings());
|
| - EXPECT_EQ(1.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(),
|
| + picture->tilings()->tiling_at(0)->raster_transform());
|
| break;
|
| case 2:
|
| // On 3rd commit, the pending layer is visible again, so has tilings and
|
| // is updated for the pinch.
|
| ASSERT_EQ(1u, picture->tilings()->num_tilings());
|
| - EXPECT_EQ(2.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(2.f, gfx::Vector2dF()),
|
| + picture->tilings()->tiling_at(0)->raster_transform());
|
| }
|
| }
|
|
|
| @@ -482,7 +485,8 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
|
| if (draws_in_frame_ == 1) {
|
| // On 1st commit the layer has tilings.
|
| EXPECT_GT(picture->tilings()->num_tilings(), 0u);
|
| - EXPECT_EQ(1.f, picture->HighResTiling()->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(),
|
| + picture->HighResTiling()->raster_transform());
|
|
|
| // Pinch zoom in to change the scale on the active tree.
|
| impl->PinchGestureBegin();
|
| @@ -492,7 +496,8 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
|
| // If the pinch gesture caused a commit we could get here with a
|
| // pending tree.
|
| EXPECT_FALSE(impl->pending_tree());
|
| - EXPECT_EQ(2.f, picture->HighResTiling()->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(2.f, gfx::Vector2dF()),
|
| + picture->HighResTiling()->raster_transform());
|
|
|
| // Need to wait for ready to draw here so that the pinch is
|
| // entirely complete, otherwise another draw might come in before
|
| @@ -610,10 +615,12 @@ class LayerTreeHostPictureTestForceRecalculateScales
|
| case 0:
|
| // On first commit, both layers are at the default scale.
|
| ASSERT_EQ(1u, will_change_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(1.f,
|
| - will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(
|
| + gfx::AxisTransform2d(),
|
| + will_change_layer->tilings()->tiling_at(0)->raster_transform());
|
| ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(1.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -625,10 +632,12 @@ class LayerTreeHostPictureTestForceRecalculateScales
|
| // On 2nd commit after scaling up to 2, the normal layer will adjust its
|
| // scale and the will change layer should not (as it is will change.
|
| ASSERT_EQ(1u, will_change_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(1.f,
|
| - will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(
|
| + gfx::AxisTransform2d(),
|
| + will_change_layer->tilings()->tiling_at(0)->raster_transform());
|
| ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(2.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(2.f, gfx::Vector2dF()),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -640,10 +649,12 @@ class LayerTreeHostPictureTestForceRecalculateScales
|
| // On 3rd commit, both layers should adjust scales due to forced
|
| // recalculating.
|
| ASSERT_EQ(1u, will_change_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(4.f,
|
| - will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(
|
| + gfx::AxisTransform2d(4.f, gfx::Vector2dF()),
|
| + will_change_layer->tilings()->tiling_at(0)->raster_transform());
|
| ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(4.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
| + EXPECT_EQ(gfx::AxisTransform2d(4.f, gfx::Vector2dF()),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
| EndTest();
|
| break;
|
| }
|
|
|