Chromium Code Reviews| 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 99217318391fde9c6b4e802f2181923e42cc9e8b..0bd0fbc774b2cf0f08b23dd8c37cf1e29ed9dcd8 100644 |
| --- a/cc/trees/layer_tree_host_impl_unittest.cc |
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc |
| @@ -2313,8 +2313,8 @@ void LayerTreeHostImplTest::SetupMouseMoveAtWithDeviceScale( |
| settings.scrollbar_animator = LayerTreeSettings::THINNING; |
| gfx::Size viewport_size(300, 200); |
| - gfx::Size device_viewport_size = gfx::ToFlooredSize( |
| - gfx::ScaleSize(viewport_size, device_scale_factor)); |
| + gfx::Size device_viewport_size = |
| + gfx::ScaleToFlooredSize(viewport_size, device_scale_factor); |
| gfx::Size content_size(1000, 1000); |
| CreateHostImpl(settings, CreateOutputSurface()); |
| @@ -3639,12 +3639,14 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsAspectRatio) { |
| host_impl_->active_tree()->OuterViewportContainerLayer(); |
| LayerImpl* inner_container = |
| host_impl_->active_tree()->InnerViewportContainerLayer(); |
| - EXPECT_EQ(gfx::Size(100, 100+25), inner_container->BoundsForScrolling()); |
| + EXPECT_EQ(gfx::SizeF(100.f, 100.f + 25.f), |
| + inner_container->BoundsForScrolling()); |
| // Outer viewport should match inner's aspect ratio. The bounds are ceiled. |
| float aspect_ratio = inner_container->BoundsForScrolling().width() / |
| inner_container->BoundsForScrolling().height(); |
| - gfx::Size expected = gfx::ToCeiledSize(gfx::SizeF(200, 200 / aspect_ratio)); |
| + gfx::SizeF expected = |
| + gfx::SizeF(gfx::ToCeiledSize(gfx::SizeF(200, 200 / aspect_ratio))); |
|
vmpstr
2015/09/23 23:04:25
This is a bit weird. It almost like we want ToCeil
|
| EXPECT_EQ(expected, outer_container->BoundsForScrolling()); |
| EXPECT_EQ(expected, |
| host_impl_->InnerViewportScrollLayer()->BoundsForScrolling()); |
| @@ -4709,7 +4711,7 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) { |
| host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f); |
| CreateScrollAndContentsLayers(host_impl_->pending_tree(), new_size); |
| host_impl_->ActivateSyncTree(); |
| - EXPECT_EQ(new_size, scroll_watcher.scrollable_size()); |
| + EXPECT_EQ(gfx::SizeF(new_size), scroll_watcher.scrollable_size()); |
| // Tear down the LayerTreeHostImpl before the InputHandlerClient. |
| host_impl_.reset(); |
| @@ -5489,7 +5491,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { |
| continue; |
| const TextureDrawQuad* texture_quad = TextureDrawQuad::MaterialCast(quad); |
| gfx::SizeF gutter_texture_size_pixels = gfx::ScaleSize( |
| - gutter_texture_size_, host_impl_->device_scale_factor()); |
| + gfx::SizeF(gutter_texture_size_), host_impl_->device_scale_factor()); |
| EXPECT_EQ(texture_quad->uv_top_left.x(), |
| texture_quad->rect.x() / gutter_texture_size_pixels.width()); |
| EXPECT_EQ(texture_quad->uv_top_left.y(), |
| @@ -5504,8 +5506,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { |
| } |
| gfx::Size DipSizeToPixelSize(const gfx::Size& size) { |
| - return gfx::ToRoundedSize( |
| - gfx::ScaleSize(size, host_impl_->device_scale_factor())); |
| + return gfx::ScaleToRoundedSize(size, host_impl_->device_scale_factor()); |
| } |
| DrawQuad::Material gutter_quad_material_; |
| @@ -6273,7 +6274,7 @@ TEST_F(LayerTreeHostImplTest, FarAwayQuadsDontNeedAA) { |
| host_impl_->SetDeviceScaleFactor(device_scale_factor); |
| gfx::Size root_size(2000, 1000); |
| gfx::Size device_viewport_size = |
| - gfx::ToCeiledSize(gfx::ScaleSize(root_size, device_scale_factor)); |
| + gfx::ScaleToCeiledSize(root_size, device_scale_factor); |
| host_impl_->SetViewportSize(device_viewport_size); |
| host_impl_->CreatePendingTree(); |