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_RESOURCES_TILE_MANAGER_H_ | 5 #ifndef CC_RESOURCES_TILE_MANAGER_H_ |
6 #define CC_RESOURCES_TILE_MANAGER_H_ | 6 #define CC_RESOURCES_TILE_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 | 286 |
287 void FreeResourceForTile(Tile* tile, RasterMode mode); | 287 void FreeResourceForTile(Tile* tile, RasterMode mode); |
288 void FreeResourcesForTile(Tile* tile); | 288 void FreeResourcesForTile(Tile* tile); |
289 void FreeUnusedResourcesForTile(Tile* tile); | 289 void FreeUnusedResourcesForTile(Tile* tile); |
290 scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile, | 290 scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile, |
291 SkPixelRef* pixel_ref); | 291 SkPixelRef* pixel_ref); |
292 scoped_refptr<RasterTask> CreateRasterTask(Tile* tile); | 292 scoped_refptr<RasterTask> CreateRasterTask(Tile* tile); |
293 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; | 293 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; |
294 void UpdatePrioritizedTileSetIfNeeded(); | 294 void UpdatePrioritizedTileSetIfNeeded(); |
| 295 void CleanUpLayers(); |
295 | 296 |
296 TileManagerClient* client_; | 297 TileManagerClient* client_; |
297 ResourcePool* resource_pool_; | 298 ResourcePool* resource_pool_; |
298 scoped_ptr<RasterizerDelegate> rasterizer_delegate_; | 299 scoped_ptr<RasterizerDelegate> rasterizer_delegate_; |
299 GlobalStateThatImpactsTilePriority global_state_; | 300 GlobalStateThatImpactsTilePriority global_state_; |
300 | 301 |
301 typedef base::hash_map<Tile::Id, Tile*> TileMap; | 302 typedef base::hash_map<Tile::Id, Tile*> TileMap; |
302 TileMap tiles_; | 303 TileMap tiles_; |
303 | 304 |
304 PrioritizedTileSet prioritized_tiles_; | 305 PrioritizedTileSet prioritized_tiles_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; | 344 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; |
344 | 345 |
345 std::vector<PictureLayerImpl*> layers_; | 346 std::vector<PictureLayerImpl*> layers_; |
346 | 347 |
347 DISALLOW_COPY_AND_ASSIGN(TileManager); | 348 DISALLOW_COPY_AND_ASSIGN(TileManager); |
348 }; | 349 }; |
349 | 350 |
350 } // namespace cc | 351 } // namespace cc |
351 | 352 |
352 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 353 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |