Chromium Code Reviews| 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/display_list_raster_source.h" | 8 #include "cc/playback/display_list_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" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 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; |
| 35 bool EnablePartialRaster() const override; | |
| 35 | 36 |
| 36 void set_twin_tiling_set(PictureLayerTilingSet* set) { | 37 void set_twin_tiling_set(PictureLayerTilingSet* set) { |
| 37 twin_set_ = set; | 38 twin_set_ = set; |
| 38 twin_tiling_ = nullptr; | 39 twin_tiling_ = nullptr; |
| 39 } | 40 } |
| 40 void set_twin_tiling(PictureLayerTiling* tiling) { | 41 void set_twin_tiling(PictureLayerTiling* tiling) { |
| 41 twin_tiling_ = tiling; | 42 twin_tiling_ = tiling; |
| 42 twin_set_ = nullptr; | 43 twin_set_ = nullptr; |
| 43 } | 44 } |
| 44 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } | 45 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } |
| 45 void set_invalidation(const Region& region) { invalidation_ = region; } | 46 void set_invalidation(const Region& region) { invalidation_ = region; } |
| 46 void set_has_valid_tile_priorities(bool has_valid_tile_priorities) { | 47 void set_has_valid_tile_priorities(bool has_valid_tile_priorities) { |
| 47 has_valid_tile_priorities_ = has_valid_tile_priorities; | 48 has_valid_tile_priorities_ = has_valid_tile_priorities; |
| 48 } | 49 } |
| 50 void set_enable_partial_Raster(bool enable_partial_raster) { | |
|
vmpstr
2015/10/06 18:35:48
nit: capitalization typo
ericrk
2015/10/07 17:59:07
Done.
| |
| 51 enable_partial_raster_ = enable_partial_raster; | |
| 52 } | |
| 53 | |
| 49 RasterSource* raster_source() { return raster_source_.get(); } | 54 RasterSource* raster_source() { return raster_source_.get(); } |
| 50 | 55 |
| 51 TileManager* tile_manager() const { | 56 TileManager* tile_manager() const { |
| 52 return tile_manager_.get(); | 57 return tile_manager_.get(); |
| 53 } | 58 } |
| 54 | 59 |
| 55 protected: | 60 protected: |
| 56 FakeTileManagerClient tile_manager_client_; | 61 FakeTileManagerClient tile_manager_client_; |
| 57 scoped_ptr<ResourcePool> resource_pool_; | 62 scoped_ptr<ResourcePool> resource_pool_; |
| 58 scoped_ptr<TileManager> tile_manager_; | 63 scoped_ptr<TileManager> tile_manager_; |
| 59 scoped_refptr<DisplayListRasterSource> raster_source_; | 64 scoped_refptr<DisplayListRasterSource> raster_source_; |
| 60 gfx::Size tile_size_; | 65 gfx::Size tile_size_; |
| 61 PictureLayerTilingSet* twin_set_; | 66 PictureLayerTilingSet* twin_set_; |
| 62 PictureLayerTiling* twin_tiling_; | 67 PictureLayerTiling* twin_tiling_; |
| 63 gfx::Rect text_rect_; | 68 gfx::Rect text_rect_; |
| 64 Region invalidation_; | 69 Region invalidation_; |
| 65 bool has_valid_tile_priorities_; | 70 bool has_valid_tile_priorities_; |
| 71 bool enable_partial_raster_; | |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 } // namespace cc | 74 } // namespace cc |
| 69 | 75 |
| 70 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ | 76 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |
| OLD | NEW |