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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 void SetGlobalStateForTesting( | 140 void SetGlobalStateForTesting( |
141 const GlobalStateThatImpactsTilePriority& state) { | 141 const GlobalStateThatImpactsTilePriority& state) { |
142 global_state_ = state; | 142 global_state_ = state; |
143 } | 143 } |
144 | 144 |
145 void SetRasterizerForTesting(Rasterizer* rasterizer); | 145 void SetRasterizerForTesting(Rasterizer* rasterizer); |
146 | 146 |
| 147 void WaitForTasksToFinishRunning(); |
| 148 |
147 void FreeResourcesAndCleanUpReleasedTilesForTesting() { | 149 void FreeResourcesAndCleanUpReleasedTilesForTesting() { |
148 FreeResourcesForReleasedTiles(); | 150 FreeResourcesForReleasedTiles(); |
149 CleanUpReleasedTiles(); | 151 CleanUpReleasedTiles(); |
150 } | 152 } |
151 | 153 |
152 std::vector<Tile*> AllTilesForTesting() const { | 154 std::vector<Tile*> AllTilesForTesting() const { |
153 std::vector<Tile*> tiles; | 155 std::vector<Tile*> tiles; |
154 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); | 156 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); |
155 ++it) { | 157 ++it) { |
156 tiles.push_back(it->second); | 158 tiles.push_back(it->second); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 RasterTilePriorityQueue raster_priority_queue_; | 275 RasterTilePriorityQueue raster_priority_queue_; |
274 EvictionTilePriorityQueue eviction_priority_queue_; | 276 EvictionTilePriorityQueue eviction_priority_queue_; |
275 bool eviction_priority_queue_is_up_to_date_; | 277 bool eviction_priority_queue_is_up_to_date_; |
276 | 278 |
277 DISALLOW_COPY_AND_ASSIGN(TileManager); | 279 DISALLOW_COPY_AND_ASSIGN(TileManager); |
278 }; | 280 }; |
279 | 281 |
280 } // namespace cc | 282 } // namespace cc |
281 | 283 |
282 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 284 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |