| 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/test/fake_picture_layer_tiling_client.h" | 5 #include "cc/test/fake_picture_layer_tiling_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 tile_manager_( | 31 tile_manager_( |
| 32 new FakeTileManager(&tile_manager_client_, resource_pool_.get())), | 32 new FakeTileManager(&tile_manager_client_, resource_pool_.get())), |
| 33 raster_source_(FakeRasterSource::CreateInfiniteFilled()), | 33 raster_source_(FakeRasterSource::CreateInfiniteFilled()), |
| 34 twin_set_(nullptr), | 34 twin_set_(nullptr), |
| 35 twin_tiling_(nullptr), | 35 twin_tiling_(nullptr), |
| 36 has_valid_tile_priorities_(true) {} | 36 has_valid_tile_priorities_(true) {} |
| 37 | 37 |
| 38 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { | 38 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 ScopedTilePtr FakePictureLayerTilingClient::CreateTile( | 41 std::unique_ptr<Tile> FakePictureLayerTilingClient::CreateTile( |
| 42 const Tile::CreateInfo& info) { | 42 const Tile::CreateInfo& info) { |
| 43 return tile_manager_->CreateTile(info, 0, 0, 0); | 43 return tile_manager_->CreateTile(info, 0, 0, 0); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { | 46 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { |
| 47 tile_size_ = tile_size; | 47 tile_size_ = tile_size; |
| 48 } | 48 } |
| 49 | 49 |
| 50 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 50 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
| 51 const gfx::Size& /* content_bounds */) const { | 51 const gfx::Size& /* content_bounds */) const { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 71 return twin_set_->tiling_at(i); | 71 return twin_set_->tiling_at(i); |
| 72 } | 72 } |
| 73 return nullptr; | 73 return nullptr; |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { | 76 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace cc | 80 } // namespace cc |
| OLD | NEW |