| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 explicit PictureLayerImplTest(const LayerTreeSettings& settings) | 81 explicit PictureLayerImplTest(const LayerTreeSettings& settings) |
| 82 : proxy_(base::MessageLoopProxy::current()), | 82 : proxy_(base::MessageLoopProxy::current()), |
| 83 host_impl_(settings, &proxy_, &shared_bitmap_manager_), | 83 host_impl_(settings, &proxy_, &shared_bitmap_manager_), |
| 84 root_id_(6), | 84 root_id_(6), |
| 85 id_(7) { | 85 id_(7) { |
| 86 host_impl_.SetViewportSize(gfx::Size(10000, 10000)); | 86 host_impl_.SetViewportSize(gfx::Size(10000, 10000)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 virtual ~PictureLayerImplTest() { | 89 ~PictureLayerImplTest() override {} |
| 90 } | |
| 91 | 90 |
| 92 void SetUp() override { InitializeRenderer(); } | 91 void SetUp() override { InitializeRenderer(); } |
| 93 | 92 |
| 94 virtual void InitializeRenderer() { | 93 virtual void InitializeRenderer() { |
| 95 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); | 94 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); |
| 96 } | 95 } |
| 97 | 96 |
| 98 void SetupDefaultTrees(const gfx::Size& layer_bounds) { | 97 void SetupDefaultTrees(const gfx::Size& layer_bounds) { |
| 99 gfx::Size tile_size(100, 100); | 98 gfx::Size tile_size(100, 100); |
| 100 | 99 |
| (...skipping 4632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4733 result = layer->CalculateTileSize(gfx::Size(447, 400)); | 4732 result = layer->CalculateTileSize(gfx::Size(447, 400)); |
| 4734 EXPECT_EQ(result.width(), 448); | 4733 EXPECT_EQ(result.width(), 448); |
| 4735 EXPECT_EQ(result.height(), 448); | 4734 EXPECT_EQ(result.height(), 448); |
| 4736 result = layer->CalculateTileSize(gfx::Size(500, 499)); | 4735 result = layer->CalculateTileSize(gfx::Size(500, 499)); |
| 4737 EXPECT_EQ(result.width(), 512); | 4736 EXPECT_EQ(result.width(), 512); |
| 4738 EXPECT_EQ(result.height(), 500 + 2); | 4737 EXPECT_EQ(result.height(), 500 + 2); |
| 4739 } | 4738 } |
| 4740 | 4739 |
| 4741 } // namespace | 4740 } // namespace |
| 4742 } // namespace cc | 4741 } // namespace cc |
| OLD | NEW |