| 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/playback/raster_source.h" | 8 #include "cc/playback/raster_source.h" |
| 9 #include "cc/test/fake_tile_manager_client.h" | 9 #include "cc/test/fake_tile_manager_client.h" |
| 10 #include "cc/tiles/picture_layer_tiling.h" | 10 #include "cc/tiles/picture_layer_tiling.h" |
| 11 #include "cc/tiles/tile.h" | 11 #include "cc/tiles/tile.h" |
| 12 #include "cc/tiles/tile_manager.h" | 12 #include "cc/tiles/tile_manager.h" |
| 13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class FakePictureLayerTilingClient : public PictureLayerTilingClient { | 17 class FakePictureLayerTilingClient : public PictureLayerTilingClient { |
| 18 public: | 18 public: |
| 19 FakePictureLayerTilingClient(); | 19 FakePictureLayerTilingClient(); |
| 20 explicit FakePictureLayerTilingClient(ResourceProvider* resource_provider); | 20 explicit FakePictureLayerTilingClient(ResourceProvider* resource_provider); |
| 21 ~FakePictureLayerTilingClient() override; | 21 ~FakePictureLayerTilingClient() override; |
| 22 | 22 |
| 23 // PictureLayerTilingClient implementation. | 23 // PictureLayerTilingClient implementation. |
| 24 ScopedTilePtr CreateTile(const Tile::CreateInfo& info) override; | 24 std::unique_ptr<Tile> CreateTile(const Tile::CreateInfo& info) override; |
| 25 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 25 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; |
| 26 bool HasValidTilePriorities() const override; | 26 bool HasValidTilePriorities() const override; |
| 27 | 27 |
| 28 void SetTileSize(const gfx::Size& tile_size); | 28 void SetTileSize(const gfx::Size& tile_size); |
| 29 gfx::Size TileSize() const { return tile_size_; } | 29 gfx::Size TileSize() const { return tile_size_; } |
| 30 | 30 |
| 31 const Region* GetPendingInvalidation() override; | 31 const Region* GetPendingInvalidation() override; |
| 32 const PictureLayerTiling* GetPendingOrActiveTwinTiling( | 32 const PictureLayerTiling* GetPendingOrActiveTwinTiling( |
| 33 const PictureLayerTiling* tiling) const override; | 33 const PictureLayerTiling* tiling) const override; |
| 34 bool RequiresHighResToDraw() const override; | 34 bool RequiresHighResToDraw() const override; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 61 PictureLayerTilingSet* twin_set_; | 61 PictureLayerTilingSet* twin_set_; |
| 62 PictureLayerTiling* twin_tiling_; | 62 PictureLayerTiling* twin_tiling_; |
| 63 gfx::Rect text_rect_; | 63 gfx::Rect text_rect_; |
| 64 Region invalidation_; | 64 Region invalidation_; |
| 65 bool has_valid_tile_priorities_; | 65 bool has_valid_tile_priorities_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace cc | 68 } // namespace cc |
| 69 | 69 |
| 70 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 70 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
| OLD | NEW |