Chromium Code Reviews| Index: cc/resources/tile_manager.h | 
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h | 
| index ce9b2801336019e52d41f31826e4f94fdbd8e687..aec4d8c81154953d4610928ee1593024ab930272 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, | 
| @@ -73,6 +75,11 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, | 
| int source_frame_number, | 
| bool can_use_lcd_text); | 
| + scoped_refptr<TileBundle> CreateTileBundle(int width, | 
| + int height, | 
| + int offset_x, | 
| + int offset_y); | 
| + | 
| scoped_ptr<base::Value> BasicStateAsValue() const; | 
| scoped_ptr<base::Value> AllTilesAsValue() const; | 
| void GetMemoryStats(size_t* memory_required_bytes, | 
| @@ -132,6 +139,9 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, | 
| // Overriden from RefCountedManager<Tile>: | 
| virtual void Release(Tile* tile) OVERRIDE; | 
| + // Overridden from RefCountedManager<TileBundle>: | 
| + virtual void Release(TileBundle* tile) OVERRIDE; | 
| + | 
| // Overriden from RasterWorkerPoolClient: | 
| virtual bool ShouldForceTasksRequiredForActivationToComplete() const | 
| OVERRIDE; | 
| @@ -151,6 +161,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, | 
| void GetTilesWithAssignedBins(PrioritizedTileSet* tiles); | 
| private: | 
| + typedef base::hash_map<TileBundle::Id, TileBundle*> TileBundleMap; | 
| 
 
reveman
2013/11/20 01:34:37
nit: make location of this typedef consistent with
 
 | 
| + | 
| void OnImageDecodeTaskCompleted( | 
| int layer_id, | 
| skia::LazyPixelRef* pixel_ref, | 
| @@ -185,6 +197,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, | 
| typedef base::hash_map<Tile::Id, Tile*> TileMap; | 
| TileMap tiles_; | 
| + TileBundleMap bundles_; | 
| + | 
| PrioritizedTileSet prioritized_tiles_; | 
| bool prioritized_tiles_dirty_; | 
| @@ -216,6 +230,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); | 
| }; |