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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue( | 58 virtual scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue( |
59 TreePriority tree_priority, | 59 TreePriority tree_priority, |
60 RasterTilePriorityQueue::Type type) = 0; | 60 RasterTilePriorityQueue::Type type) = 0; |
61 | 61 |
62 // Given an empty eviction tile priority queue, this will build a priority | 62 // Given an empty eviction tile priority queue, this will build a priority |
63 // queue that will return tiles in order in which they should be evicted. | 63 // queue that will return tiles in order in which they should be evicted. |
64 // Note if the queue was previous built, Reset must be called on it. | 64 // Note if the queue was previous built, Reset must be called on it. |
65 virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( | 65 virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( |
66 TreePriority tree_priority) = 0; | 66 TreePriority tree_priority) = 0; |
67 | 67 |
| 68 // Informs the client that due to the currently rasterizing (or scheduled to |
| 69 // be rasterized) tiles, we will be in a position that will likely require a |
| 70 // draw. This can be used to preemptively start a frame. |
| 71 virtual void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) = 0; |
| 72 |
68 protected: | 73 protected: |
69 virtual ~TileManagerClient() {} | 74 virtual ~TileManagerClient() {} |
70 }; | 75 }; |
71 | 76 |
72 struct RasterTaskCompletionStats { | 77 struct RasterTaskCompletionStats { |
73 RasterTaskCompletionStats(); | 78 RasterTaskCompletionStats(); |
74 | 79 |
75 size_t completed_count; | 80 size_t completed_count; |
76 size_t canceled_count; | 81 size_t canceled_count; |
77 }; | 82 }; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 311 |
307 bool did_notify_ready_to_activate_; | 312 bool did_notify_ready_to_activate_; |
308 bool did_notify_ready_to_draw_; | 313 bool did_notify_ready_to_draw_; |
309 | 314 |
310 DISALLOW_COPY_AND_ASSIGN(TileManager); | 315 DISALLOW_COPY_AND_ASSIGN(TileManager); |
311 }; | 316 }; |
312 | 317 |
313 } // namespace cc | 318 } // namespace cc |
314 | 319 |
315 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 320 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |