| 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_TILES_TILE_MANAGER_H_ | 5 #ifndef CC_TILES_TILE_MANAGER_H_ |
| 6 #define CC_TILES_TILE_MANAGER_H_ | 6 #define CC_TILES_TILE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 int64 memory_bytes() const { return memory_bytes_; } | 231 int64 memory_bytes() const { return memory_bytes_; } |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 int64 memory_bytes_; | 234 int64 memory_bytes_; |
| 235 int resource_count_; | 235 int resource_count_; |
| 236 }; | 236 }; |
| 237 | 237 |
| 238 void OnRasterTaskCompleted( | 238 void OnRasterTaskCompleted( |
| 239 Tile::Id tile, | 239 Tile::Id tile, |
| 240 Resource* resource, | 240 Resource* resource, |
| 241 const DisplayListRasterSource::SolidColorAnalysis& analysis, | |
| 242 bool was_canceled); | 241 bool was_canceled); |
| 243 void UpdateTileDrawInfo( | 242 void UpdateTileDrawInfo(Tile* tile, Resource* resource); |
| 244 Tile* tile, | |
| 245 Resource* resource, | |
| 246 const DisplayListRasterSource::SolidColorAnalysis& analysis); | |
| 247 | 243 |
| 248 void FreeResourcesForTile(Tile* tile); | 244 void FreeResourcesForTile(Tile* tile); |
| 249 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile); | 245 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile); |
| 250 scoped_refptr<RasterTask> CreateRasterTask( | 246 scoped_refptr<RasterTask> CreateRasterTask( |
| 251 const PrioritizedTile& prioritized_tile); | 247 const PrioritizedTile& prioritized_tile); |
| 252 | 248 |
| 253 scoped_ptr<EvictionTilePriorityQueue> | 249 scoped_ptr<EvictionTilePriorityQueue> |
| 254 FreeTileResourcesUntilUsageIsWithinLimit( | 250 FreeTileResourcesUntilUsageIsWithinLimit( |
| 255 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue, | 251 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue, |
| 256 const MemoryUsage& limit, | 252 const MemoryUsage& limit, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 uint64_t next_tile_id_; | 329 uint64_t next_tile_id_; |
| 334 | 330 |
| 335 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 331 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
| 336 | 332 |
| 337 DISALLOW_COPY_AND_ASSIGN(TileManager); | 333 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 338 }; | 334 }; |
| 339 | 335 |
| 340 } // namespace cc | 336 } // namespace cc |
| 341 | 337 |
| 342 #endif // CC_TILES_TILE_MANAGER_H_ | 338 #endif // CC_TILES_TILE_MANAGER_H_ |
| OLD | NEW |