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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 void FreeResourceForTile(Tile* tile, RasterMode mode); | 283 void FreeResourceForTile(Tile* tile, RasterMode mode); |
284 void FreeResourcesForTile(Tile* tile); | 284 void FreeResourcesForTile(Tile* tile); |
285 void FreeUnusedResourcesForTile(Tile* tile); | 285 void FreeUnusedResourcesForTile(Tile* tile); |
286 scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile, | 286 scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile, |
287 SkPixelRef* pixel_ref); | 287 SkPixelRef* pixel_ref); |
288 scoped_refptr<RasterTask> CreateRasterTask(Tile* tile); | 288 scoped_refptr<RasterTask> CreateRasterTask(Tile* tile); |
289 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; | 289 scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; |
290 void UpdatePrioritizedTileSetIfNeeded(); | 290 void UpdatePrioritizedTileSetIfNeeded(); |
| 291 void CleanUpLayers(); |
291 | 292 |
292 TileManagerClient* client_; | 293 TileManagerClient* client_; |
293 ResourcePool* resource_pool_; | 294 ResourcePool* resource_pool_; |
294 scoped_ptr<RasterizerDelegate> rasterizer_delegate_; | 295 scoped_ptr<RasterizerDelegate> rasterizer_delegate_; |
295 GlobalStateThatImpactsTilePriority global_state_; | 296 GlobalStateThatImpactsTilePriority global_state_; |
296 | 297 |
297 typedef base::hash_map<Tile::Id, Tile*> TileMap; | 298 typedef base::hash_map<Tile::Id, Tile*> TileMap; |
298 TileMap tiles_; | 299 TileMap tiles_; |
299 | 300 |
300 PrioritizedTileSet prioritized_tiles_; | 301 PrioritizedTileSet prioritized_tiles_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; | 341 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; |
341 | 342 |
342 std::vector<PictureLayerImpl*> layers_; | 343 std::vector<PictureLayerImpl*> layers_; |
343 | 344 |
344 DISALLOW_COPY_AND_ASSIGN(TileManager); | 345 DISALLOW_COPY_AND_ASSIGN(TileManager); |
345 }; | 346 }; |
346 | 347 |
347 } // namespace cc | 348 } // namespace cc |
348 | 349 |
349 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 350 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |