| 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 PictureLayerTiling* GetRecycledTwinTiling( |
| 40 const PictureLayerTiling* tiling) const OVERRIDE; |
| 39 virtual WhichTree GetTree() const OVERRIDE; | 41 virtual WhichTree GetTree() const OVERRIDE; |
| 40 | 42 |
| 41 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } | 43 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } |
| 44 void set_recycled_twin_tiling(PictureLayerTiling* tiling) { |
| 45 recycled_twin_tiling_ = tiling; |
| 46 } |
| 42 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } | 47 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } |
| 43 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } | 48 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } |
| 44 void set_invalidation(const Region& region) { invalidation_ = region; } | 49 void set_invalidation(const Region& region) { invalidation_ = region; } |
| 45 void set_max_tiles_for_interest_area(size_t area) { | 50 void set_max_tiles_for_interest_area(size_t area) { |
| 46 max_tiles_for_interest_area_ = area; | 51 max_tiles_for_interest_area_ = area; |
| 47 } | 52 } |
| 48 void set_skewport_target_time_in_seconds(float time) { | 53 void set_skewport_target_time_in_seconds(float time) { |
| 49 skewport_target_time_in_seconds_ = time; | 54 skewport_target_time_in_seconds_ = time; |
| 50 } | 55 } |
| 51 void set_skewport_extrapolation_limit_in_content_pixels(int limit) { | 56 void set_skewport_extrapolation_limit_in_content_pixels(int limit) { |
| 52 skewport_extrapolation_limit_in_content_pixels_ = limit; | 57 skewport_extrapolation_limit_in_content_pixels_ = limit; |
| 53 } | 58 } |
| 54 void set_tree(WhichTree tree) { tree_ = tree; } | 59 void set_tree(WhichTree tree) { tree_ = tree; } |
| 55 | 60 |
| 56 TileManager* tile_manager() const { | 61 TileManager* tile_manager() const { |
| 57 return tile_manager_.get(); | 62 return tile_manager_.get(); |
| 58 } | 63 } |
| 59 | 64 |
| 60 protected: | 65 protected: |
| 61 FakeTileManagerClient tile_manager_client_; | 66 FakeTileManagerClient tile_manager_client_; |
| 62 scoped_ptr<ResourcePool> resource_pool_; | 67 scoped_ptr<ResourcePool> resource_pool_; |
| 63 scoped_ptr<TileManager> tile_manager_; | 68 scoped_ptr<TileManager> tile_manager_; |
| 64 scoped_refptr<PicturePileImpl> pile_; | 69 scoped_refptr<PicturePileImpl> pile_; |
| 65 gfx::Size tile_size_; | 70 gfx::Size tile_size_; |
| 66 PictureLayerTiling* twin_tiling_; | 71 PictureLayerTiling* twin_tiling_; |
| 72 PictureLayerTiling* recycled_twin_tiling_; |
| 67 gfx::Rect text_rect_; | 73 gfx::Rect text_rect_; |
| 68 bool allow_create_tile_; | 74 bool allow_create_tile_; |
| 69 Region invalidation_; | 75 Region invalidation_; |
| 70 size_t max_tiles_for_interest_area_; | 76 size_t max_tiles_for_interest_area_; |
| 71 float skewport_target_time_in_seconds_; | 77 float skewport_target_time_in_seconds_; |
| 72 int skewport_extrapolation_limit_in_content_pixels_; | 78 int skewport_extrapolation_limit_in_content_pixels_; |
| 73 WhichTree tree_; | 79 WhichTree tree_; |
| 74 }; | 80 }; |
| 75 | 81 |
| 76 } // namespace cc | 82 } // namespace cc |
| 77 | 83 |
| 78 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 84 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
| OLD | NEW |