| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1880 | 1880 |
| 1881 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false); | 1881 SetContentsScaleOnBothLayers(contents_scale, 1.f, page_scale, 1.f, false); |
| 1882 ASSERT_GE(pending_layer_->num_tilings(), 0u); | 1882 ASSERT_GE(pending_layer_->num_tilings(), 0u); |
| 1883 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(), | 1883 EXPECT_FLOAT_EQ(pending_layer_->MinimumContentsScale(), |
| 1884 pending_layer_->HighResTiling()->contents_scale()); | 1884 pending_layer_->HighResTiling()->contents_scale()); |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest { | 1887 class DeferredInitPictureLayerImplTest : public PictureLayerImplTest { |
| 1888 public: | 1888 public: |
| 1889 virtual void InitializeRenderer() OVERRIDE { | 1889 virtual void InitializeRenderer() OVERRIDE { |
| 1890 host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL( | 1890 bool delegated_rendering = false; |
| 1891 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice)) | 1891 host_impl_.InitializeRenderer( |
| 1892 .PassAs<OutputSurface>()); | 1892 FakeOutputSurface::CreateDeferredGL( |
| 1893 scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice), |
| 1894 delegated_rendering).PassAs<OutputSurface>()); |
| 1893 } | 1895 } |
| 1894 | 1896 |
| 1895 virtual void SetUp() OVERRIDE { | 1897 virtual void SetUp() OVERRIDE { |
| 1896 PictureLayerImplTest::SetUp(); | 1898 PictureLayerImplTest::SetUp(); |
| 1897 | 1899 |
| 1898 // Create some default active and pending trees. | 1900 // Create some default active and pending trees. |
| 1899 gfx::Size tile_size(100, 100); | 1901 gfx::Size tile_size(100, 100); |
| 1900 gfx::Size layer_bounds(400, 400); | 1902 gfx::Size layer_bounds(400, 400); |
| 1901 | 1903 |
| 1902 scoped_refptr<FakePicturePileImpl> pending_pile = | 1904 scoped_refptr<FakePicturePileImpl> pending_pile = |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 SetContentsScaleOnBothLayers(contents_scale, | 2358 SetContentsScaleOnBothLayers(contents_scale, |
| 2357 device_scale, | 2359 device_scale, |
| 2358 page_scale, | 2360 page_scale, |
| 2359 maximum_animation_scale, | 2361 maximum_animation_scale, |
| 2360 animating_transform); | 2362 animating_transform); |
| 2361 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); | 2363 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); |
| 2362 } | 2364 } |
| 2363 | 2365 |
| 2364 } // namespace | 2366 } // namespace |
| 2365 } // namespace cc | 2367 } // namespace cc |
| OLD | NEW |