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

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

Issue 860813002: Remove the default format from ResourcePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error in another perftest. 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void BasicStateAsValueInto(base::debug::TracedValue* dict) const; 132 void BasicStateAsValueInto(base::debug::TracedValue* dict) const;
133 const MemoryHistory::Entry& memory_stats_from_last_assign() const { 133 const MemoryHistory::Entry& memory_stats_from_last_assign() const {
134 return memory_stats_from_last_assign_; 134 return memory_stats_from_last_assign_;
135 } 135 }
136 136
137 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { 137 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) {
138 for (size_t i = 0; i < tiles.size(); ++i) { 138 for (size_t i = 0; i < tiles.size(); ++i) {
139 TileDrawInfo& draw_info = tiles[i]->draw_info(); 139 TileDrawInfo& draw_info = tiles[i]->draw_info();
140 draw_info.resource_ = 140 draw_info.resource_ =
141 resource_pool_->AcquireResource(tiles[i]->desired_texture_size(), 141 resource_pool_->AcquireResource(tiles[i]->desired_texture_size(),
142 resource_pool_->default_format()); 142 resource_format_);
143 } 143 }
144 } 144 }
145 145
146 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { 146 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) {
147 for (size_t i = 0; i < tiles.size(); ++i) { 147 for (size_t i = 0; i < tiles.size(); ++i) {
148 Tile* tile = tiles[i]; 148 Tile* tile = tiles[i];
149 FreeResourcesForTile(tile); 149 FreeResourcesForTile(tile);
150 } 150 }
151 } 151 }
152 152
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 284 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
285 LayerPixelRefTaskMap image_decode_tasks_; 285 LayerPixelRefTaskMap image_decode_tasks_;
286 286
287 typedef base::hash_map<int, int> LayerCountMap; 287 typedef base::hash_map<int, int> LayerCountMap;
288 LayerCountMap used_layer_counts_; 288 LayerCountMap used_layer_counts_;
289 289
290 RasterTaskCompletionStats update_visible_tiles_stats_; 290 RasterTaskCompletionStats update_visible_tiles_stats_;
291 291
292 std::vector<Tile*> released_tiles_; 292 std::vector<Tile*> released_tiles_;
293 293
294 ResourceFormat resource_format_; 294 ResourceFormat resource_format_;
reveman 2015/01/23 16:41:42 nit: Do we still need this member variable? Can we
peterp 2015/01/26 17:05:28 You're right. I've remove it.
295 295
296 // Queue used when scheduling raster tasks. 296 // Queue used when scheduling raster tasks.
297 TileTaskQueue raster_queue_; 297 TileTaskQueue raster_queue_;
298 298
299 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_; 299 std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_;
300 300
301 UniqueNotifier ready_to_activate_notifier_; 301 UniqueNotifier ready_to_activate_notifier_;
302 UniqueNotifier ready_to_draw_notifier_; 302 UniqueNotifier ready_to_draw_notifier_;
303 UniqueNotifier ready_to_activate_check_notifier_; 303 UniqueNotifier ready_to_activate_check_notifier_;
304 UniqueNotifier ready_to_draw_check_notifier_; 304 UniqueNotifier ready_to_draw_check_notifier_;
305 UniqueNotifier more_tiles_need_prepare_check_notifier_; 305 UniqueNotifier more_tiles_need_prepare_check_notifier_;
306 306
307 RasterTilePriorityQueue raster_priority_queue_; 307 RasterTilePriorityQueue raster_priority_queue_;
308 EvictionTilePriorityQueue eviction_priority_queue_; 308 EvictionTilePriorityQueue eviction_priority_queue_;
309 bool eviction_priority_queue_is_up_to_date_; 309 bool eviction_priority_queue_is_up_to_date_;
310 310
311 bool did_notify_ready_to_activate_; 311 bool did_notify_ready_to_activate_;
312 bool did_notify_ready_to_draw_; 312 bool did_notify_ready_to_draw_;
313 313
314 DISALLOW_COPY_AND_ASSIGN(TileManager); 314 DISALLOW_COPY_AND_ASSIGN(TileManager);
315 }; 315 };
316 316
317 } // namespace cc 317 } // namespace cc
318 318
319 #endif // CC_RESOURCES_TILE_MANAGER_H_ 319 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698