| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Given an empty raster tile priority queue, this will build a priority queue | 60 // Given an empty raster tile priority queue, this will build a priority queue |
| 61 // that will return tiles in order in which they should be rasterized. | 61 // that will return tiles in order in which they should be rasterized. |
| 62 // Note if the queue was previous built, Reset must be called on it. | 62 // Note if the queue was previous built, Reset must be called on it. |
| 63 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, | 63 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, |
| 64 TreePriority tree_priority, | 64 TreePriority tree_priority, |
| 65 RasterTilePriorityQueue::Type type) = 0; | 65 RasterTilePriorityQueue::Type type) = 0; |
| 66 | 66 |
| 67 // Given an empty eviction tile priority queue, this will build a priority | 67 // Given an empty eviction tile priority queue, this will build a priority |
| 68 // queue that will return tiles in order in which they should be evicted. | 68 // queue that will return tiles in order in which they should be evicted. |
| 69 // Note if the queue was previous built, Reset must be called on it. | 69 // Note if the queue was previous built, Reset must be called on it. |
| 70 virtual void BuildEvictionQueue(EvictionTilePriorityQueue* queue, | 70 virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( |
| 71 TreePriority tree_priority) = 0; | 71 TreePriority tree_priority) = 0; |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 virtual ~TileManagerClient() {} | 74 virtual ~TileManagerClient() {} |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 struct RasterTaskCompletionStats { | 77 struct RasterTaskCompletionStats { |
| 78 RasterTaskCompletionStats(); | 78 RasterTaskCompletionStats(); |
| 79 | 79 |
| 80 size_t completed_count; | 80 size_t completed_count; |
| 81 size_t canceled_count; | 81 size_t canceled_count; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 TileTaskQueue raster_queue_; | 298 TileTaskQueue raster_queue_; |
| 299 | 299 |
| 300 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_; | 300 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_; |
| 301 | 301 |
| 302 UniqueNotifier ready_to_activate_notifier_; | 302 UniqueNotifier ready_to_activate_notifier_; |
| 303 UniqueNotifier ready_to_draw_notifier_; | 303 UniqueNotifier ready_to_draw_notifier_; |
| 304 UniqueNotifier ready_to_activate_check_notifier_; | 304 UniqueNotifier ready_to_activate_check_notifier_; |
| 305 UniqueNotifier ready_to_draw_check_notifier_; | 305 UniqueNotifier ready_to_draw_check_notifier_; |
| 306 UniqueNotifier more_tiles_need_prepare_check_notifier_; | 306 UniqueNotifier more_tiles_need_prepare_check_notifier_; |
| 307 | 307 |
| 308 EvictionTilePriorityQueue eviction_priority_queue_; | 308 scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue_; |
| 309 bool eviction_priority_queue_is_up_to_date_; | |
| 310 | 309 |
| 311 bool did_notify_ready_to_activate_; | 310 bool did_notify_ready_to_activate_; |
| 312 bool did_notify_ready_to_draw_; | 311 bool did_notify_ready_to_draw_; |
| 313 | 312 |
| 314 DISALLOW_COPY_AND_ASSIGN(TileManager); | 313 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 315 }; | 314 }; |
| 316 | 315 |
| 317 } // namespace cc | 316 } // namespace cc |
| 318 | 317 |
| 319 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 318 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
| OLD | NEW |