| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 156 } |
| 157 | 157 |
| 158 void SetRasterizerForTesting(Rasterizer* rasterizer); | 158 void SetRasterizerForTesting(Rasterizer* rasterizer); |
| 159 | 159 |
| 160 void FreeResourcesAndCleanUpReleasedTilesForTesting() { | 160 void FreeResourcesAndCleanUpReleasedTilesForTesting() { |
| 161 prioritized_tiles_.Clear(); | 161 prioritized_tiles_.Clear(); |
| 162 FreeResourcesForReleasedTiles(); | 162 FreeResourcesForReleasedTiles(); |
| 163 CleanUpReleasedTiles(); | 163 CleanUpReleasedTiles(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 std::vector<Tile*> AllTilesForTesting() const { |
| 167 std::vector<Tile*> tiles; |
| 168 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); |
| 169 ++it) { |
| 170 tiles.push_back(it->second); |
| 171 } |
| 172 return tiles; |
| 173 } |
| 174 |
| 166 protected: | 175 protected: |
| 167 TileManager(TileManagerClient* client, | 176 TileManager(TileManagerClient* client, |
| 168 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 177 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| 169 ResourcePool* resource_pool, | 178 ResourcePool* resource_pool, |
| 170 Rasterizer* rasterizer, | 179 Rasterizer* rasterizer, |
| 171 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 180 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| 172 | 181 |
| 173 // Methods called by Tile | 182 // Methods called by Tile |
| 174 friend class Tile; | 183 friend class Tile; |
| 175 void DidChangeTilePriority(Tile* tile); | 184 void DidChangeTilePriority(Tile* tile); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; | 278 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; |
| 270 | 279 |
| 271 UniqueNotifier ready_to_activate_check_notifier_; | 280 UniqueNotifier ready_to_activate_check_notifier_; |
| 272 | 281 |
| 273 DISALLOW_COPY_AND_ASSIGN(TileManager); | 282 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 274 }; | 283 }; |
| 275 | 284 |
| 276 } // namespace cc | 285 } // namespace cc |
| 277 | 286 |
| 278 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 287 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
| OLD | NEW |