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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const MemoryHistory::Entry& memory_stats_from_last_assign() const { | 195 const MemoryHistory::Entry& memory_stats_from_last_assign() const { |
196 return memory_stats_from_last_assign_; | 196 return memory_stats_from_last_assign_; |
197 } | 197 } |
198 | 198 |
199 void GetPairedPictureLayers(std::vector<PairedPictureLayer>* layers) const; | 199 void GetPairedPictureLayers(std::vector<PairedPictureLayer>* layers) const; |
200 | 200 |
201 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { | 201 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { |
202 for (size_t i = 0; i < tiles.size(); ++i) { | 202 for (size_t i = 0; i < tiles.size(); ++i) { |
203 ManagedTileState& mts = tiles[i]->managed_state(); | 203 ManagedTileState& mts = tiles[i]->managed_state(); |
204 ManagedTileState::TileVersion& tile_version = | 204 ManagedTileState::TileVersion& tile_version = |
205 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE]; | 205 mts.tile_versions[HIGH_QUALITY_RASTER_MODE]; |
206 | 206 |
207 tile_version.resource_ = resource_pool_->AcquireResource(gfx::Size(1, 1)); | 207 tile_version.resource_ = resource_pool_->AcquireResource(gfx::Size(1, 1)); |
208 | 208 |
209 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]); | 209 bytes_releasable_ += BytesConsumedIfAllocated(tiles[i]); |
210 ++resources_releasable_; | 210 ++resources_releasable_; |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { | 214 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { |
215 for (size_t i = 0; i < tiles.size(); ++i) { | 215 for (size_t i = 0; i < tiles.size(); ++i) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; | 343 std::vector<scoped_refptr<RasterTask> > orphan_raster_tasks_; |
344 | 344 |
345 UniqueNotifier ready_to_activate_check_notifier_; | 345 UniqueNotifier ready_to_activate_check_notifier_; |
346 | 346 |
347 DISALLOW_COPY_AND_ASSIGN(TileManager); | 347 DISALLOW_COPY_AND_ASSIGN(TileManager); |
348 }; | 348 }; |
349 | 349 |
350 } // namespace cc | 350 } // namespace cc |
351 | 351 |
352 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 352 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |