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 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( | 42 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( |
43 PictureLayerTiling*, | 43 PictureLayerTiling*, |
44 const gfx::Rect& rect) { | 44 const gfx::Rect& rect) { |
45 if (!allow_create_tile_) | 45 if (!allow_create_tile_) |
46 return scoped_refptr<Tile>(); | 46 return scoped_refptr<Tile>(); |
47 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); | 47 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); |
48 } | 48 } |
49 | 49 |
50 PicturePileImpl* FakePictureLayerTilingClient::GetPile() { | 50 RasterSource* FakePictureLayerTilingClient::GetRasterSource() { |
51 return pile_.get(); | 51 return pile_.get(); |
52 } | 52 } |
53 | 53 |
54 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { | 54 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { |
55 tile_size_ = tile_size; | 55 tile_size_ = tile_size; |
56 } | 56 } |
57 | 57 |
58 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 58 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
59 const gfx::Size& /* content_bounds */) const { | 59 const gfx::Size& /* content_bounds */) const { |
60 return tile_size_; | 60 return tile_size_; |
(...skipping 29 matching lines...) Expand all Loading... |
90 | 90 |
91 WhichTree FakePictureLayerTilingClient::GetTree() const { | 91 WhichTree FakePictureLayerTilingClient::GetTree() const { |
92 return tree_; | 92 return tree_; |
93 } | 93 } |
94 | 94 |
95 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { | 95 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { |
96 return false; | 96 return false; |
97 } | 97 } |
98 | 98 |
99 } // namespace cc | 99 } // namespace cc |
OLD | NEW |