| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_RESOURCES_RASTERIZER_H_ | 5 #ifndef CC_RESOURCES_RASTERIZER_H_ |
| 6 #define CC_RESOURCES_RASTERIZER_H_ | 6 #define CC_RESOURCES_RASTERIZER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "cc/resources/resource_pool.h" | 11 #include "cc/resources/resource_pool.h" |
| 12 #include "cc/resources/tile.h" | 12 #include "cc/resources/tile.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class TileManager; | 15 class TileManager; |
| 16 | 16 |
| 17 enum class PrepareTilesMode { | 17 enum class PrepareTilesMode { |
| 18 RASTERIZE_PRIORITIZED_TILES, | 18 RASTERIZE_PRIORITIZED_TILES, |
| 19 PREPARE_PRIORITIZED_TILES, | |
| 20 PREPARE_NONE | 19 PREPARE_NONE |
| 21 }; | 20 }; |
| 22 | 21 |
| 23 class CC_EXPORT Rasterizer { | 22 class CC_EXPORT Rasterizer { |
| 24 public: | 23 public: |
| 25 using TileVector = std::vector<Tile*>; | 24 using TileVector = std::vector<Tile*>; |
| 26 using UpdateTileDrawInfoCallback = | 25 using UpdateTileDrawInfoCallback = |
| 27 base::Callback<void(Tile*, | 26 base::Callback<void(Tile*, |
| 28 scoped_ptr<ScopedResource>, | 27 scoped_ptr<ScopedResource>, |
| 29 const RasterSource::SolidColorAnalysis&)>; | 28 const RasterSource::SolidColorAnalysis&)>; |
| 30 | 29 |
| 31 virtual ~Rasterizer() {} | 30 virtual ~Rasterizer() {} |
| 32 virtual PrepareTilesMode GetPrepareTilesMode() = 0; | 31 virtual PrepareTilesMode GetPrepareTilesMode() = 0; |
| 33 virtual void RasterizeTiles( | 32 virtual void RasterizeTiles( |
| 34 const TileVector& tiles, | 33 const TileVector& tiles, |
| 35 ResourcePool* resource_pool, | 34 ResourcePool* resource_pool, |
| 36 ResourceFormat resource_format, | 35 ResourceFormat resource_format, |
| 37 const UpdateTileDrawInfoCallback& update_tile_draw_info) = 0; | 36 const UpdateTileDrawInfoCallback& update_tile_draw_info) = 0; |
| 38 | 37 |
| 39 protected: | 38 protected: |
| 40 Rasterizer() {} | 39 Rasterizer() {} |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(Rasterizer); | 42 DISALLOW_COPY_AND_ASSIGN(Rasterizer); |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 } // namespace cc | 45 } // namespace cc |
| 47 | 46 |
| 48 #endif // CC_RESOURCES_RASTERIZER_H_ | 47 #endif // CC_RESOURCES_RASTERIZER_H_ |
| OLD | NEW |