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

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

Issue 23802002: CC: Delete unused code and fix priority_ array definition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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/tile.h ('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 <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 scoped_ptr<base::Value> AllTilesAsValue() const; 69 scoped_ptr<base::Value> AllTilesAsValue() const;
70 void GetMemoryStats(size_t* memory_required_bytes, 70 void GetMemoryStats(size_t* memory_required_bytes,
71 size_t* memory_nice_to_have_bytes, 71 size_t* memory_nice_to_have_bytes,
72 size_t* memory_allocated_bytes, 72 size_t* memory_allocated_bytes,
73 size_t* memory_used_bytes) const; 73 size_t* memory_used_bytes) const;
74 74
75 const MemoryHistory::Entry& memory_stats_from_last_assign() const { 75 const MemoryHistory::Entry& memory_stats_from_last_assign() const {
76 return memory_stats_from_last_assign_; 76 return memory_stats_from_last_assign_;
77 } 77 }
78 78
79 bool AreTilesRequiredForActivationReady() const {
80 return all_tiles_required_for_activation_have_been_initialized_;
81 }
82
83 void InitializeTilesWithResourcesForTesting( 79 void InitializeTilesWithResourcesForTesting(
84 const std::vector<Tile*>& tiles, 80 const std::vector<Tile*>& tiles,
85 ResourceProvider* resource_provider) { 81 ResourceProvider* resource_provider) {
86 for (size_t i = 0; i < tiles.size(); ++i) { 82 for (size_t i = 0; i < tiles.size(); ++i) {
87 ManagedTileState& mts = tiles[i]->managed_state(); 83 ManagedTileState& mts = tiles[i]->managed_state();
88 ManagedTileState::TileVersion& tile_version = 84 ManagedTileState::TileVersion& tile_version =
89 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE]; 85 mts.tile_versions[HIGH_QUALITY_NO_LCD_RASTER_MODE];
90 86
91 tile_version.resource_ = make_scoped_ptr( 87 tile_version.resource_ = make_scoped_ptr(
92 new ResourcePool::Resource(resource_provider, 88 new ResourcePool::Resource(resource_provider,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 GlobalStateThatImpactsTilePriority global_state_; 154 GlobalStateThatImpactsTilePriority global_state_;
159 155
160 typedef base::hash_map<Tile::Id, Tile*> TileMap; 156 typedef base::hash_map<Tile::Id, Tile*> TileMap;
161 TileMap tiles_; 157 TileMap tiles_;
162 158
163 PrioritizedTileSet prioritized_tiles_; 159 PrioritizedTileSet prioritized_tiles_;
164 bool prioritized_tiles_dirty_; 160 bool prioritized_tiles_dirty_;
165 161
166 bool all_tiles_that_need_to_be_rasterized_have_memory_; 162 bool all_tiles_that_need_to_be_rasterized_have_memory_;
167 bool all_tiles_required_for_activation_have_memory_; 163 bool all_tiles_required_for_activation_have_memory_;
168 bool all_tiles_required_for_activation_have_been_initialized_;
169 164
170 size_t bytes_releasable_; 165 size_t bytes_releasable_;
171 size_t resources_releasable_; 166 size_t resources_releasable_;
172 167
173 bool ever_exceeded_memory_budget_; 168 bool ever_exceeded_memory_budget_;
174 MemoryHistory::Entry memory_stats_from_last_assign_; 169 MemoryHistory::Entry memory_stats_from_last_assign_;
175 170
176 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 171 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
177 172
178 bool did_initialize_visible_tile_; 173 bool did_initialize_visible_tile_;
179 174
180 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; 175 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap;
181 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 176 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
182 LayerPixelRefTaskMap image_decode_tasks_; 177 LayerPixelRefTaskMap image_decode_tasks_;
183 178
184 RasterTaskCompletionStats update_visible_tiles_stats_; 179 RasterTaskCompletionStats update_visible_tiles_stats_;
185 180
186 DISALLOW_COPY_AND_ASSIGN(TileManager); 181 DISALLOW_COPY_AND_ASSIGN(TileManager);
187 }; 182 };
188 183
189 } // namespace cc 184 } // namespace cc
190 185
191 #endif // CC_RESOURCES_TILE_MANAGER_H_ 186 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698