| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 void CheckIfMoreTilesNeedToBePreparedForTesting() { | 194 void CheckIfMoreTilesNeedToBePreparedForTesting() { |
| 195 CheckIfMoreTilesNeedToBePrepared(); | 195 CheckIfMoreTilesNeedToBePrepared(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void SetMoreTilesNeedToBeRasterizedForTesting() { | 198 void SetMoreTilesNeedToBeRasterizedForTesting() { |
| 199 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; | 199 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 void ResetSignalsForTesting() { signals_.reset(); } |
| 203 |
| 202 bool HasScheduledTileTasksForTesting() const { | 204 bool HasScheduledTileTasksForTesting() const { |
| 203 return has_scheduled_tile_tasks_; | 205 return has_scheduled_tile_tasks_; |
| 204 } | 206 } |
| 205 | 207 |
| 206 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, | 208 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, |
| 207 Tile::Id tile_id, | 209 Tile::Id tile_id, |
| 208 Resource* resource, | 210 Resource* resource, |
| 209 bool was_canceled); | 211 bool was_canceled); |
| 210 | 212 |
| 211 void SetDecodedImageTracker(DecodedImageTracker* decoded_image_tracker); | 213 void SetDecodedImageTracker(DecodedImageTracker* decoded_image_tracker); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 std::unique_ptr<EvictionTilePriorityQueue> | 275 std::unique_ptr<EvictionTilePriorityQueue> |
| 274 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( | 276 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( |
| 275 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, | 277 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, |
| 276 const MemoryUsage& limit, | 278 const MemoryUsage& limit, |
| 277 const TilePriority& oother_priority, | 279 const TilePriority& oother_priority, |
| 278 MemoryUsage* usage); | 280 MemoryUsage* usage); |
| 279 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); | 281 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); |
| 280 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; | 282 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; |
| 281 void CheckIfMoreTilesNeedToBePrepared(); | 283 void CheckIfMoreTilesNeedToBePrepared(); |
| 282 void CheckAndIssueSignals(); | 284 void CheckAndIssueSignals(); |
| 283 bool MarkTilesOutOfMemory( | 285 void MarkTilesOutOfMemory( |
| 284 std::unique_ptr<RasterTilePriorityQueue> queue) const; | 286 std::unique_ptr<RasterTilePriorityQueue> queue) const; |
| 285 | 287 |
| 286 ResourceFormat DetermineResourceFormat(const Tile* tile) const; | 288 ResourceFormat DetermineResourceFormat(const Tile* tile) const; |
| 287 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; | 289 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; |
| 288 | 290 |
| 289 void DidFinishRunningTileTasksRequiredForActivation(); | 291 void DidFinishRunningTileTasksRequiredForActivation(); |
| 290 void DidFinishRunningTileTasksRequiredForDraw(); | 292 void DidFinishRunningTileTasksRequiredForDraw(); |
| 291 void DidFinishRunningAllTileTasks(); | 293 void DidFinishRunningAllTileTasks(); |
| 292 | 294 |
| 293 scoped_refptr<TileTask> CreateTaskSetFinishedTask( | 295 scoped_refptr<TileTask> CreateTaskSetFinishedTask( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 const bool check_tile_priority_inversion_; | 342 const bool check_tile_priority_inversion_; |
| 341 | 343 |
| 342 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 344 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
| 343 | 345 |
| 344 DISALLOW_COPY_AND_ASSIGN(TileManager); | 346 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 345 }; | 347 }; |
| 346 | 348 |
| 347 } // namespace cc | 349 } // namespace cc |
| 348 | 350 |
| 349 #endif // CC_TILES_TILE_MANAGER_H_ | 351 #endif // CC_TILES_TILE_MANAGER_H_ |
| OLD | NEW |