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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 const; | 130 const; |
131 void BasicStateAsValueInto(base::debug::TracedValue* dict) const; | 131 void BasicStateAsValueInto(base::debug::TracedValue* dict) const; |
132 const MemoryHistory::Entry& memory_stats_from_last_assign() const { | 132 const MemoryHistory::Entry& memory_stats_from_last_assign() const { |
133 return memory_stats_from_last_assign_; | 133 return memory_stats_from_last_assign_; |
134 } | 134 } |
135 | 135 |
136 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { | 136 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { |
137 for (size_t i = 0; i < tiles.size(); ++i) { | 137 for (size_t i = 0; i < tiles.size(); ++i) { |
138 TileDrawInfo& draw_info = tiles[i]->draw_info(); | 138 TileDrawInfo& draw_info = tiles[i]->draw_info(); |
139 draw_info.resource_ = | 139 draw_info.resource_ = |
140 resource_pool_->AcquireResource(tiles[i]->desired_texture_size()); | 140 resource_pool_->AcquireResource(tiles[i]->desired_texture_size(), |
| 141 resource_pool_->default_format()); |
141 } | 142 } |
142 } | 143 } |
143 | 144 |
144 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { | 145 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { |
145 for (size_t i = 0; i < tiles.size(); ++i) { | 146 for (size_t i = 0; i < tiles.size(); ++i) { |
146 Tile* tile = tiles[i]; | 147 Tile* tile = tiles[i]; |
147 FreeResourcesForTile(tile); | 148 FreeResourcesForTile(tile); |
148 } | 149 } |
149 } | 150 } |
150 | 151 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 309 |
309 bool did_notify_ready_to_activate_; | 310 bool did_notify_ready_to_activate_; |
310 bool did_notify_ready_to_draw_; | 311 bool did_notify_ready_to_draw_; |
311 | 312 |
312 DISALLOW_COPY_AND_ASSIGN(TileManager); | 313 DISALLOW_COPY_AND_ASSIGN(TileManager); |
313 }; | 314 }; |
314 | 315 |
315 } // namespace cc | 316 } // namespace cc |
316 | 317 |
317 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 318 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |