| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resources/picture_layer_tiling.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 raster_source, | 69 raster_source, |
| 70 client, | 70 client, |
| 71 max_tiles_for_interest_area, | 71 max_tiles_for_interest_area, |
| 72 skewport_target_time, | 72 skewport_target_time, |
| 73 skewport_extrapolation_limit) {} | 73 skewport_extrapolation_limit) {} |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class PictureLayerTilingIteratorTest : public testing::Test { | 76 class PictureLayerTilingIteratorTest : public testing::Test { |
| 77 public: | 77 public: |
| 78 PictureLayerTilingIteratorTest() {} | 78 PictureLayerTilingIteratorTest() {} |
| 79 virtual ~PictureLayerTilingIteratorTest() {} | 79 ~PictureLayerTilingIteratorTest() override {} |
| 80 | 80 |
| 81 void Initialize(const gfx::Size& tile_size, | 81 void Initialize(const gfx::Size& tile_size, |
| 82 float contents_scale, | 82 float contents_scale, |
| 83 const gfx::Size& layer_bounds) { | 83 const gfx::Size& layer_bounds) { |
| 84 client_.SetTileSize(tile_size); | 84 client_.SetTileSize(tile_size); |
| 85 client_.set_tree(PENDING_TREE); | 85 client_.set_tree(PENDING_TREE); |
| 86 scoped_refptr<FakePicturePileImpl> pile = | 86 scoped_refptr<FakePicturePileImpl> pile = |
| 87 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); | 87 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); |
| 88 tiling_ = TestablePictureLayerTiling::Create(contents_scale, pile, &client_, | 88 tiling_ = TestablePictureLayerTiling::Create(contents_scale, pile, &client_, |
| 89 LayerTreeSettings()); | 89 LayerTreeSettings()); |
| (...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 tiling_->SetRasterSourceAndResize(pile); | 2067 tiling_->SetRasterSourceAndResize(pile); |
| 2068 | 2068 |
| 2069 // Tile size in the tiling should be resized to 250x200. | 2069 // Tile size in the tiling should be resized to 250x200. |
| 2070 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width()); | 2070 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width()); |
| 2071 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height()); | 2071 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height()); |
| 2072 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size()); | 2072 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size()); |
| 2073 } | 2073 } |
| 2074 | 2074 |
| 2075 } // namespace | 2075 } // namespace |
| 2076 } // namespace cc | 2076 } // namespace cc |
| OLD | NEW |