Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: cc/resources/tile_manager.h

Issue 817133006: Support different formats in the same resource pool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO about removing the default format. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698