| 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 cbdd64173b992ac97242a338b057a72620366e81..691b4137dd4e6188d5962f87de2468757f520297 100644
|
| --- a/cc/trees/layer_tree_host_unittest_picture.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_picture.cc
|
| @@ -458,19 +458,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(ScaleTranslate2d(),
|
| + 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(ScaleTranslate2d(),
|
| + 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(ScaleTranslate2d(2.f, gfx::Vector2dF()),
|
| + picture->tilings()->tiling_at(0)->raster_transform());
|
| }
|
| }
|
|
|
| @@ -488,7 +491,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(ScaleTranslate2d(),
|
| + picture->HighResTiling()->raster_transform());
|
|
|
| // Pinch zoom in to change the scale on the active tree.
|
| impl->PinchGestureBegin();
|
| @@ -498,7 +502,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(ScaleTranslate2d(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
|
| @@ -616,10 +621,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(
|
| + ScaleTranslate2d(),
|
| + 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(ScaleTranslate2d(),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -631,10 +638,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(
|
| + ScaleTranslate2d(),
|
| + 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(ScaleTranslate2d(2.f, gfx::Vector2dF()),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -646,10 +655,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(
|
| + ScaleTranslate2d(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(ScaleTranslate2d(4.f, gfx::Vector2dF()),
|
| + normal_layer->tilings()->tiling_at(0)->raster_transform());
|
| EndTest();
|
| break;
|
| }
|
|
|