| 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_tile_manager.h" | 9 #include "cc/test/fake_tile_manager.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( | 43 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( |
| 44 PictureLayerTiling*, | 44 PictureLayerTiling*, |
| 45 const gfx::Rect& rect) { | 45 const gfx::Rect& rect) { |
| 46 if (!allow_create_tile_) | 46 if (!allow_create_tile_) |
| 47 return scoped_refptr<Tile>(); | 47 return scoped_refptr<Tile>(); |
| 48 return tile_manager_->CreateTile( | 48 return tile_manager_->CreateTile( |
| 49 pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, Tile::USE_LCD_TEXT); | 49 pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, Tile::USE_LCD_TEXT); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) { | 52 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { |
| 53 tile_size_ = tile_size; | 53 tile_size_ = tile_size; |
| 54 } | 54 } |
| 55 | 55 |
| 56 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 56 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
| 57 gfx::Size /* content_bounds */) const { | 57 const gfx::Size& /* content_bounds */) const { |
| 58 return tile_size_; | 58 return tile_size_; |
| 59 } | 59 } |
| 60 | 60 |
| 61 const Region* FakePictureLayerTilingClient::GetInvalidation() { | 61 const Region* FakePictureLayerTilingClient::GetInvalidation() { |
| 62 return &invalidation_; | 62 return &invalidation_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling( | 65 const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling( |
| 66 const PictureLayerTiling* tiling) const { | 66 const PictureLayerTiling* tiling) const { |
| 67 return twin_tiling_; | 67 return twin_tiling_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace cc | 70 } // namespace cc |
| OLD | NEW |