| 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 f7d4fadceebdec062e4e036b2fd7a61946c855fb..bb13a32b06e8f9435189e513b23655e71fd108a6 100644
|
| --- a/cc/trees/layer_tree_host_unittest_picture.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_picture.cc
|
| @@ -458,19 +458,19 @@ 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_key());
|
| + EXPECT_EQ(1.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| 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_key());
|
| + EXPECT_EQ(1.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| 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_key());
|
| + EXPECT_EQ(2.f, picture->tilings()->tiling_at(0)->contents_scale());
|
| }
|
| }
|
|
|
| @@ -488,7 +488,7 @@ 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_key());
|
| + EXPECT_EQ(1.f, picture->HighResTiling()->contents_scale());
|
|
|
| // Pinch zoom in to change the scale on the active tree.
|
| impl->PinchGestureBegin();
|
| @@ -498,7 +498,7 @@ 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_key());
|
| + EXPECT_EQ(2.f, picture->HighResTiling()->contents_scale());
|
|
|
| // Need to wait for ready to draw here so that the pinch is
|
| // entirely complete, otherwise another draw might come in before
|
| @@ -616,12 +616,10 @@ 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_key());
|
| - ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| EXPECT_EQ(1.f,
|
| - normal_layer->tilings()->tiling_at(0)->contents_scale_key());
|
| + will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| + ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| + EXPECT_EQ(1.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -633,12 +631,10 @@ 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_key());
|
| + EXPECT_EQ(1.f,
|
| + will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| - EXPECT_EQ(2.f,
|
| - normal_layer->tilings()->tiling_at(0)->contents_scale_key());
|
| + EXPECT_EQ(2.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
|
|
| MainThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -650,12 +646,10 @@ 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_key());
|
| - ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| EXPECT_EQ(4.f,
|
| - normal_layer->tilings()->tiling_at(0)->contents_scale_key());
|
| + will_change_layer->tilings()->tiling_at(0)->contents_scale());
|
| + ASSERT_EQ(1u, normal_layer->tilings()->num_tilings());
|
| + EXPECT_EQ(4.f, normal_layer->tilings()->tiling_at(0)->contents_scale());
|
| EndTest();
|
| break;
|
| }
|
|
|