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 <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 scoped_ptr<EvictionTilePriorityQueue> | 276 scoped_ptr<EvictionTilePriorityQueue> |
277 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( | 277 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( |
278 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue, | 278 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue, |
279 const MemoryUsage& limit, | 279 const MemoryUsage& limit, |
280 const TilePriority& oother_priority, | 280 const TilePriority& oother_priority, |
281 MemoryUsage* usage); | 281 MemoryUsage* usage); |
282 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); | 282 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); |
283 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; | 283 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; |
284 void CheckIfMoreTilesNeedToBePrepared(); | 284 void CheckIfMoreTilesNeedToBePrepared(); |
285 void CheckAndIssueSignals(); | 285 void CheckAndIssueSignals(); |
| 286 bool MarkTilesOutOfMemory(scoped_ptr<RasterTilePriorityQueue> queue) const; |
286 | 287 |
287 ResourceFormat DetermineResourceFormat(const Tile* tile) const; | 288 ResourceFormat DetermineResourceFormat(const Tile* tile) const; |
288 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; | 289 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; |
289 | 290 |
290 TileManagerClient* client_; | 291 TileManagerClient* client_; |
291 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 292 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
292 ResourcePool* resource_pool_; | 293 ResourcePool* resource_pool_; |
293 TileTaskRunner* tile_task_runner_; | 294 TileTaskRunner* tile_task_runner_; |
294 GlobalStateThatImpactsTilePriority global_state_; | 295 GlobalStateThatImpactsTilePriority global_state_; |
295 size_t scheduled_raster_task_limit_; | 296 size_t scheduled_raster_task_limit_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 337 |
337 uint64_t prepare_tiles_count_; | 338 uint64_t prepare_tiles_count_; |
338 uint64_t next_tile_id_; | 339 uint64_t next_tile_id_; |
339 | 340 |
340 DISALLOW_COPY_AND_ASSIGN(TileManager); | 341 DISALLOW_COPY_AND_ASSIGN(TileManager); |
341 }; | 342 }; |
342 | 343 |
343 } // namespace cc | 344 } // namespace cc |
344 | 345 |
345 #endif // CC_TILES_TILE_MANAGER_H_ | 346 #endif // CC_TILES_TILE_MANAGER_H_ |
OLD | NEW |