| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "cc/test/fake_picture_pile_impl.h" | 9 #include "cc/test/fake_picture_pile_impl.h" |
| 10 #include "cc/test/fake_tile_manager.h" | 10 #include "cc/test/fake_tile_manager.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 twin_tiling_(nullptr), | 31 twin_tiling_(nullptr), |
| 32 recycled_twin_tiling_(nullptr), | 32 recycled_twin_tiling_(nullptr), |
| 33 max_tile_priority_bin_(TilePriority::NOW) { | 33 max_tile_priority_bin_(TilePriority::NOW) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { | 36 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { |
| 37 } | 37 } |
| 38 | 38 |
| 39 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( | 39 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( |
| 40 float content_scale, | 40 float content_scale, |
| 41 const gfx::Rect& rect) { | 41 const gfx::Rect& rect, |
| 42 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); | 42 scoped_refptr<RasterSource>* raster_source) { |
| 43 return tile_manager_->CreateTile(raster_source, tile_size_, rect, 1, 0, 0, 0); |
| 43 } | 44 } |
| 44 | 45 |
| 45 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { | 46 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { |
| 46 tile_size_ = tile_size; | 47 tile_size_ = tile_size; |
| 47 } | 48 } |
| 48 | 49 |
| 49 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 50 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
| 50 const gfx::Size& /* content_bounds */) const { | 51 const gfx::Size& /* content_bounds */) const { |
| 51 return tile_size_; | 52 return tile_size_; |
| 52 } | 53 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 79 | 80 |
| 80 WhichTree FakePictureLayerTilingClient::GetTree() const { | 81 WhichTree FakePictureLayerTilingClient::GetTree() const { |
| 81 return tree_; | 82 return tree_; |
| 82 } | 83 } |
| 83 | 84 |
| 84 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { | 85 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { |
| 85 return false; | 86 return false; |
| 86 } | 87 } |
| 87 | 88 |
| 88 } // namespace cc | 89 } // namespace cc |
| OLD | NEW |