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 #ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
6 #define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 6 #define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
7 | 7 |
8 #include "cc/resources/picture_layer_tiling.h" | 8 #include "cc/resources/picture_layer_tiling.h" |
9 #include "cc/resources/picture_pile_impl.h" | 9 #include "cc/resources/picture_pile_impl.h" |
10 #include "cc/resources/tile.h" | 10 #include "cc/resources/tile.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; | 29 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; |
30 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; | 30 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; |
31 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; | 31 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; |
32 | 32 |
33 void SetTileSize(const gfx::Size& tile_size); | 33 void SetTileSize(const gfx::Size& tile_size); |
34 gfx::Size TileSize() const { return tile_size_; } | 34 gfx::Size TileSize() const { return tile_size_; } |
35 | 35 |
36 virtual const Region* GetInvalidation() OVERRIDE; | 36 virtual const Region* GetInvalidation() OVERRIDE; |
37 virtual const PictureLayerTiling* GetTwinTiling( | 37 virtual const PictureLayerTiling* GetTwinTiling( |
38 const PictureLayerTiling* tiling) const OVERRIDE; | 38 const PictureLayerTiling* tiling) const OVERRIDE; |
| 39 virtual WhichTree GetTree() const OVERRIDE; |
39 | 40 |
40 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } | 41 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } |
41 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } | 42 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } |
42 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } | 43 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } |
43 void set_invalidation(const Region& region) { invalidation_ = region; } | 44 void set_invalidation(const Region& region) { invalidation_ = region; } |
44 void set_max_tiles_for_interest_area(size_t area) { | 45 void set_max_tiles_for_interest_area(size_t area) { |
45 max_tiles_for_interest_area_ = area; | 46 max_tiles_for_interest_area_ = area; |
46 } | 47 } |
47 void set_skewport_target_time_in_seconds(float time) { | 48 void set_skewport_target_time_in_seconds(float time) { |
48 skewport_target_time_in_seconds_ = time; | 49 skewport_target_time_in_seconds_ = time; |
49 } | 50 } |
50 void set_skewport_extrapolation_limit_in_content_pixels(int limit) { | 51 void set_skewport_extrapolation_limit_in_content_pixels(int limit) { |
51 skewport_extrapolation_limit_in_content_pixels_ = limit; | 52 skewport_extrapolation_limit_in_content_pixels_ = limit; |
52 } | 53 } |
| 54 void set_tree(WhichTree tree) { tree_ = tree; } |
53 | 55 |
54 TileManager* tile_manager() const { | 56 TileManager* tile_manager() const { |
55 return tile_manager_.get(); | 57 return tile_manager_.get(); |
56 } | 58 } |
57 | 59 |
58 protected: | 60 protected: |
59 FakeTileManagerClient tile_manager_client_; | 61 FakeTileManagerClient tile_manager_client_; |
60 scoped_ptr<ResourcePool> resource_pool_; | 62 scoped_ptr<ResourcePool> resource_pool_; |
61 scoped_ptr<TileManager> tile_manager_; | 63 scoped_ptr<TileManager> tile_manager_; |
62 scoped_refptr<PicturePileImpl> pile_; | 64 scoped_refptr<PicturePileImpl> pile_; |
63 gfx::Size tile_size_; | 65 gfx::Size tile_size_; |
64 PictureLayerTiling* twin_tiling_; | 66 PictureLayerTiling* twin_tiling_; |
65 gfx::Rect text_rect_; | 67 gfx::Rect text_rect_; |
66 bool allow_create_tile_; | 68 bool allow_create_tile_; |
67 Region invalidation_; | 69 Region invalidation_; |
68 size_t max_tiles_for_interest_area_; | 70 size_t max_tiles_for_interest_area_; |
69 float skewport_target_time_in_seconds_; | 71 float skewport_target_time_in_seconds_; |
70 int skewport_extrapolation_limit_in_content_pixels_; | 72 int skewport_extrapolation_limit_in_content_pixels_; |
| 73 WhichTree tree_; |
71 }; | 74 }; |
72 | 75 |
73 } // namespace cc | 76 } // namespace cc |
74 | 77 |
75 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 78 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
OLD | NEW |