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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 MemoryUsage* usage); | 234 MemoryUsage* usage); |
235 bool FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( | 235 bool FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( |
236 const MemoryUsage& limit, | 236 const MemoryUsage& limit, |
237 const TilePriority& oother_priority, | 237 const TilePriority& oother_priority, |
238 MemoryUsage* usage); | 238 MemoryUsage* usage); |
239 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); | 239 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); |
240 bool IsReadyToActivate() const; | 240 bool IsReadyToActivate() const; |
241 bool IsReadyToDraw() const; | 241 bool IsReadyToDraw() const; |
242 void CheckIfReadyToActivate(); | 242 void CheckIfReadyToActivate(); |
243 void CheckIfReadyToDraw(); | 243 void CheckIfReadyToDraw(); |
| 244 void CheckIfMoreTilesNeedToBePrepared(); |
244 | 245 |
245 TileManagerClient* client_; | 246 TileManagerClient* client_; |
246 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 247 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
247 ResourcePool* resource_pool_; | 248 ResourcePool* resource_pool_; |
248 TileTaskRunner* tile_task_runner_; | 249 TileTaskRunner* tile_task_runner_; |
249 GlobalStateThatImpactsTilePriority global_state_; | 250 GlobalStateThatImpactsTilePriority global_state_; |
250 size_t scheduled_raster_task_limit_; | 251 size_t scheduled_raster_task_limit_; |
251 | 252 |
252 typedef base::hash_map<Tile::Id, Tile*> TileMap; | 253 typedef base::hash_map<Tile::Id, Tile*> TileMap; |
253 TileMap tiles_; | 254 TileMap tiles_; |
(...skipping 18 matching lines...) Expand all Loading... |
272 | 273 |
273 ResourceFormat resource_format_; | 274 ResourceFormat resource_format_; |
274 | 275 |
275 // Queue used when scheduling raster tasks. | 276 // Queue used when scheduling raster tasks. |
276 TileTaskQueue raster_queue_; | 277 TileTaskQueue raster_queue_; |
277 | 278 |
278 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_; | 279 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_; |
279 | 280 |
280 UniqueNotifier ready_to_activate_check_notifier_; | 281 UniqueNotifier ready_to_activate_check_notifier_; |
281 UniqueNotifier ready_to_draw_check_notifier_; | 282 UniqueNotifier ready_to_draw_check_notifier_; |
| 283 UniqueNotifier more_tiles_need_prepare_check_notifier_; |
282 | 284 |
283 RasterTilePriorityQueue raster_priority_queue_; | 285 RasterTilePriorityQueue raster_priority_queue_; |
284 EvictionTilePriorityQueue eviction_priority_queue_; | 286 EvictionTilePriorityQueue eviction_priority_queue_; |
285 bool eviction_priority_queue_is_up_to_date_; | 287 bool eviction_priority_queue_is_up_to_date_; |
286 | 288 |
287 bool did_notify_ready_to_activate_; | 289 bool did_notify_ready_to_activate_; |
288 bool did_notify_ready_to_draw_; | 290 bool did_notify_ready_to_draw_; |
289 | 291 |
290 DISALLOW_COPY_AND_ASSIGN(TileManager); | 292 DISALLOW_COPY_AND_ASSIGN(TileManager); |
291 }; | 293 }; |
292 | 294 |
293 } // namespace cc | 295 } // namespace cc |
294 | 296 |
295 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 297 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |