Chromium Code Reviews| Index: cc/resources/tile_manager.h |
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h |
| index 0aa89d749fb69c72217f05d6f2b537d67417f006..990ab76e7bf9bac214b94bb8627a502b788396b2 100644 |
| --- a/cc/resources/tile_manager.h |
| +++ b/cc/resources/tile_manager.h |
| @@ -21,6 +21,7 @@ |
| #include "cc/resources/raster_worker_pool.h" |
| #include "cc/resources/resource_pool.h" |
| #include "cc/resources/tile.h" |
| +#include "cc/resources/tile_bundle.h" |
| namespace cc { |
| class ResourceProvider; |
| @@ -47,7 +48,8 @@ scoped_ptr<base::Value> RasterTaskCompletionStatsAsValue( |
| // by layers; they automatically register with the manager when they are |
| // created, and unregister from the manager when they are deleted. |
| class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
| - public RefCountedManager<Tile> { |
| + public RefCountedManager<Tile>, |
| + public RefCountedManager<TileBundle> { |
| public: |
| static scoped_ptr<TileManager> Create( |
| TileManagerClient* client, |
| @@ -74,6 +76,11 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
| int source_frame_number, |
| bool can_use_lcd_text); |
| + scoped_refptr<TileBundle> CreateTileBundle(int offset_x, |
| + int offset_y, |
| + int width, |
| + int height); |
| + |
| scoped_ptr<base::Value> BasicStateAsValue() const; |
| scoped_ptr<base::Value> AllTilesAsValue() const; |
| void GetMemoryStats(size_t* memory_required_bytes, |
| @@ -124,15 +131,21 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
| size_t max_raster_usage_bytes, |
| RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| - // Methods called by Tile |
| + // Methods called by Tile and TileBundle |
| + friend class TileBundle; |
| friend class Tile; |
| + |
| void DidChangeTilePriority(Tile* tile); |
| + void DidChangeTileBundlePriority(TileBundle* bundle); |
| void CleanUpReleasedTiles(); |
| // Overriden from RefCountedManager<Tile>: |
|
reveman
2013/12/02 01:46:08
Mind fixing the spelling error here while at it? O
vmpstr
2013/12/02 23:08:00
Done.
|
| virtual void Release(Tile* tile) OVERRIDE; |
| + // Overridden from RefCountedManager<TileBundle>: |
| + virtual void Release(TileBundle* tile) OVERRIDE; |
|
reveman
2013/12/02 01:46:08
s/tile/bundle/ ?
vmpstr
2013/12/02 23:08:00
Done.
|
| + |
| // Overriden from RasterWorkerPoolClient: |
|
reveman
2013/12/02 01:46:08
and here.
vmpstr
2013/12/02 23:08:00
Done.
|
| virtual bool ShouldForceTasksRequiredForActivationToComplete() const |
| OVERRIDE; |
| @@ -186,6 +199,9 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
| typedef base::hash_map<Tile::Id, Tile*> TileMap; |
| TileMap tiles_; |
| + typedef base::hash_map<TileBundle::Id, TileBundle*> TileBundleMap; |
| + TileBundleMap bundles_; |
| + |
| PrioritizedTileSet prioritized_tiles_; |
| bool prioritized_tiles_dirty_; |
| @@ -217,6 +233,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, |
| RasterTaskCompletionStats update_visible_tiles_stats_; |
| std::vector<Tile*> released_tiles_; |
| + std::vector<TileBundle*> released_tile_bundles_; |
| DISALLOW_COPY_AND_ASSIGN(TileManager); |
| }; |