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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { | 35 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { |
36 } | 36 } |
37 | 37 |
38 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( | 38 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( |
39 PictureLayerTiling*, | 39 PictureLayerTiling*, |
40 const gfx::Rect& rect) { | 40 const gfx::Rect& rect) { |
41 if (!allow_create_tile_) | 41 if (!allow_create_tile_) |
42 return scoped_refptr<Tile>(); | 42 return scoped_refptr<Tile>(); |
43 return tile_manager_->CreateTile( | 43 return tile_manager_->CreateTile( |
44 pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, Tile::USE_LCD_TEXT); | 44 pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, 0); |
45 } | 45 } |
46 | 46 |
47 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { | 47 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { |
48 tile_size_ = tile_size; | 48 tile_size_ = tile_size; |
49 } | 49 } |
50 | 50 |
51 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 51 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
52 const gfx::Size& /* content_bounds */) const { | 52 const gfx::Size& /* content_bounds */) const { |
53 return tile_size_; | 53 return tile_size_; |
54 } | 54 } |
(...skipping 14 matching lines...) Expand all Loading... |
69 const Region* FakePictureLayerTilingClient::GetInvalidation() { | 69 const Region* FakePictureLayerTilingClient::GetInvalidation() { |
70 return &invalidation_; | 70 return &invalidation_; |
71 } | 71 } |
72 | 72 |
73 const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling( | 73 const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling( |
74 const PictureLayerTiling* tiling) const { | 74 const PictureLayerTiling* tiling) const { |
75 return twin_tiling_; | 75 return twin_tiling_; |
76 } | 76 } |
77 | 77 |
78 } // namespace cc | 78 } // namespace cc |
OLD | NEW |