Chromium Code Reviews| Index: cc/test/fake_picture_layer_tiling_client.h |
| diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h |
| index 4b092e810f57b6ac46ed39eeaf390ed67a64d809..56a4903ed362d81820d6a388f33cc2f00883128a 100644 |
| --- a/cc/test/fake_picture_layer_tiling_client.h |
| +++ b/cc/test/fake_picture_layer_tiling_client.h |
| @@ -23,6 +23,8 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { |
| // PictureLayerTilingClient implementation. |
| virtual scoped_refptr<Tile> CreateTile( |
| PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE; |
| + virtual scoped_refptr<TileBundle> CreateTileBundle( |
| + gfx::Rect bundle_rect) OVERRIDE; |
| virtual void UpdatePile(Tile* tile) OVERRIDE {} |
| virtual gfx::Size CalculateTileSize( |
| gfx::Size content_bounds) const OVERRIDE; |
| @@ -35,6 +37,21 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { |
| virtual const Region* GetInvalidation() OVERRIDE; |
| virtual const PictureLayerTiling* GetTwinTiling( |
| const PictureLayerTiling* tiling) const OVERRIDE; |
| + virtual bool IsActive() const OVERRIDE { |
| + return is_active_; |
| + } |
| + void MarkActive() { |
| + is_active_ = true; |
| + is_pending_ = false; |
| + } |
| + |
| + virtual bool IsPending() const OVERRIDE { |
| + return is_pending_; |
| + } |
| + void MarkPending() { |
| + is_active_ = false; |
| + is_pending_ = true; |
| + } |
| void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } |
| void set_text_rect(gfx::Rect rect) { text_rect_ = rect; } |
| @@ -42,18 +59,25 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { |
| void set_invalidation(const Region& region) { invalidation_ = region; } |
| TileManager* tile_manager() const { |
| - return tile_manager_.get(); |
| + return set_tile_manager_ ? set_tile_manager_ : tile_manager_.get(); |
| + } |
| + |
| + void set_tile_manager(TileManager* tile_manager) { |
| + set_tile_manager_ = tile_manager; |
|
vmpstr
2013/11/27 00:03:15
This is still a todo that I'm working on.
|
| } |
| protected: |
| FakeTileManagerClient tile_manager_client_; |
| scoped_ptr<TileManager> tile_manager_; |
| + TileManager* set_tile_manager_; |
| scoped_refptr<PicturePileImpl> pile_; |
| gfx::Size tile_size_; |
| PictureLayerTiling* twin_tiling_; |
| gfx::Rect text_rect_; |
| bool allow_create_tile_; |
| Region invalidation_; |
| + bool is_active_; |
| + bool is_pending_; |
| }; |
| } // namespace cc |