| 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 1ad9c246a595be2c25f7563eb7880dd3ca9c95c9..887fc3a95119c439371157a038def5288c16c55a 100644
|
| --- a/cc/test/fake_picture_layer_tiling_client.h
|
| +++ b/cc/test/fake_picture_layer_tiling_client.h
|
| @@ -23,6 +23,10 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient {
|
| // PictureLayerTilingClient implementation.
|
| virtual scoped_refptr<Tile> CreateTile(
|
| PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE;
|
| + virtual scoped_refptr<TileBundle> CreateTileBundle(int width,
|
| + int height,
|
| + int offset_x,
|
| + int offset_y) OVERRIDE;
|
| virtual void UpdatePile(Tile* tile) OVERRIDE {}
|
| virtual gfx::Size CalculateTileSize(
|
| gfx::Size content_bounds) const OVERRIDE;
|
| @@ -35,6 +39,33 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient {
|
| virtual const Region* GetInvalidation() OVERRIDE;
|
| virtual const PictureLayerTiling* GetTwinTiling(
|
| const PictureLayerTiling* tiling) OVERRIDE;
|
| + virtual bool IsActive() const OVERRIDE {
|
| + return is_active_;
|
| + }
|
| + void MarkActive() {
|
| + is_active_ = true;
|
| + is_pending_ = false;
|
| + is_recycled_ = false;
|
| + }
|
| +
|
| + virtual bool IsPending() const OVERRIDE {
|
| + return is_pending_;
|
| + }
|
| + void MarkPending() {
|
| + is_active_ = false;
|
| + is_pending_ = true;
|
| + is_recycled_ = false;
|
| + }
|
| +
|
| + virtual bool IsRecycled() const OVERRIDE {
|
| + return is_recycled_;
|
| + }
|
| + void MarkRecycled() {
|
| + is_active_ = false;
|
| + is_pending_ = false;
|
| + is_recycled_ = true;
|
| + }
|
| +
|
|
|
| void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; }
|
| void set_text_rect(gfx::Rect rect) { text_rect_ = rect; }
|
| @@ -42,18 +73,26 @@ 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;
|
| }
|
|
|
| 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_;
|
| + bool is_recycled_;
|
| };
|
|
|
| } // namespace cc
|
|
|