Chromium Code Reviews| Index: cc/resources/tile_manager.h |
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h |
| index 2633a0ed3d150a03ab1af48330e5bfb9680a7d02..45e68b587306d30f31cf8cbee2afb502efd6660a 100644 |
| --- a/cc/resources/tile_manager.h |
| +++ b/cc/resources/tile_manager.h |
| @@ -110,32 +110,35 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient { |
| virtual void DidFinishedRunningTasks() OVERRIDE; |
| virtual void DidFinishedRunningTasksRequiredForActivation() OVERRIDE; |
| - // Virtual for test |
| - virtual void ScheduleTasks(); |
| + typedef std::vector<Tile*> TileVector; |
| - const std::vector<Tile*>& tiles_that_need_to_be_rasterized() const { |
| - return tiles_that_need_to_be_rasterized_; |
| - } |
| + // Virtual for test |
| + virtual void ScheduleTasks( |
| + const TileVector& tiles_that_need_to_be_rasterized); |
| - void ReassignGpuMemoryToOOMTilesRequiredForActivation(); |
| + void ReassignGpuMemoryToOOMTilesRequiredForActivation( |
| + TileVector* tiles_that_need_to_be_rasterized); |
| + void AssignGpuMemoryToTiles( |
| + TileVector* tiles_that_need_to_be_rasterized); |
| + void AssignBinsToTiles(); |
| + void SortTiles(); |
| private: |
| + // TODO(vmpstr): Make this be Tile::Id once crbug.com/253972 is fixed. |
| + typedef uint64 ManagedTileId; |
| void OnImageDecodeTaskCompleted( |
| int layer_id, |
| skia::LazyPixelRef* pixel_ref, |
| bool was_canceled); |
| void OnRasterTaskCompleted( |
| - scoped_refptr<Tile> tile, |
| + ManagedTileId tile, |
| scoped_ptr<ResourcePool::Resource> resource, |
| RasterMode raster_mode, |
| const PicturePileImpl::Analysis& analysis, |
| bool was_canceled); |
| - void AssignBinsToTiles(); |
| - void SortTiles(); |
| RasterMode DetermineRasterMode(const Tile* tile) const; |
| void CleanUpUnusedImageDecodeTasks(); |
| - void AssignGpuMemoryToTiles(); |
| void FreeResourceForTile(Tile* tile, RasterMode mode); |
| void FreeResourcesForTile(Tile* tile); |
| void FreeUnusedResourcesForTile(Tile* tile); |
| @@ -155,10 +158,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient { |
| scoped_ptr<RasterWorkerPool> raster_worker_pool_; |
| GlobalStateThatImpactsTilePriority global_state_; |
| - typedef std::vector<Tile*> TileVector; |
| - TileVector tiles_; |
| - TileVector tiles_that_need_to_be_rasterized_; |
| typedef std::set<Tile*> TileSet; |
|
reveman
2013/07/03 20:20:06
move this below TileVector tiles_;
vmpstr
2013/07/03 23:47:51
Done.
|
| + TileVector tiles_; |
|
reveman
2013/07/03 20:20:06
how about sorted_tiles_?
vmpstr
2013/07/03 23:47:51
Done.
|
| TileSet tiles_that_need_to_be_initialized_for_activation_; |
| TileSet oom_tiles_that_need_to_be_initialized_for_activation_; |
|
reveman
2013/07/03 20:20:06
|oom_tiles_that_need_to_be_initialized_for_activat
vmpstr
2013/07/03 23:47:51
Done.
|
| @@ -175,6 +176,9 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient { |
| typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; |
| LayerPixelRefTaskMap image_decode_tasks_; |
| + typedef base::hash_map<ManagedTileId, Tile*> TileMap; |
| + TileMap managed_tiles_; |
|
reveman
2013/07/03 20:20:06
This is now the most important container of this c
vmpstr
2013/07/03 23:47:51
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(TileManager); |
| }; |