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