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

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

Issue 23757024: cc: Speed up CleanUpImageDecodeTasks a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | cc/resources/tile_manager.cc » ('J')
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 tile_version.resource_ = make_scoped_ptr( 87 tile_version.resource_ = make_scoped_ptr(
88 new ResourcePool::Resource(resource_provider, 88 new ResourcePool::Resource(resource_provider,
89 gfx::Size(1, 1), 89 gfx::Size(1, 1),
90 resource_provider->best_texture_format())); 90 resource_provider->best_texture_format()));
91 91
92 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated(); 92 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated();
93 ++resources_releasable_; 93 ++resources_releasable_;
94 } 94 }
95 } 95 }
96 RasterWorkerPool* RasterWorkerPoolForTesting() {
97 return raster_worker_pool_.get();
98 }
96 99
97 protected: 100 protected:
98 TileManager(TileManagerClient* client, 101 TileManager(TileManagerClient* client,
99 ResourceProvider* resource_provider, 102 ResourceProvider* resource_provider,
100 scoped_ptr<RasterWorkerPool> raster_worker_pool, 103 scoped_ptr<RasterWorkerPool> raster_worker_pool,
101 size_t num_raster_threads, 104 size_t num_raster_threads,
102 RenderingStatsInstrumentation* rendering_stats_instrumentation); 105 RenderingStatsInstrumentation* rendering_stats_instrumentation);
103 106
104 // Methods called by Tile 107 // Methods called by Tile
105 friend class Tile; 108 friend class Tile;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 MemoryHistory::Entry memory_stats_from_last_assign_; 172 MemoryHistory::Entry memory_stats_from_last_assign_;
170 173
171 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 174 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
172 175
173 bool did_initialize_visible_tile_; 176 bool did_initialize_visible_tile_;
174 177
175 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; 178 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap;
176 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; 179 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap;
177 LayerPixelRefTaskMap image_decode_tasks_; 180 LayerPixelRefTaskMap image_decode_tasks_;
178 181
182 typedef base::hash_map<int, int> LayerCountMap;
183 LayerCountMap used_layer_counts_;
184
179 RasterTaskCompletionStats update_visible_tiles_stats_; 185 RasterTaskCompletionStats update_visible_tiles_stats_;
180 186
181 DISALLOW_COPY_AND_ASSIGN(TileManager); 187 DISALLOW_COPY_AND_ASSIGN(TileManager);
182 }; 188 };
183 189
184 } // namespace cc 190 } // namespace cc
185 191
186 #endif // CC_RESOURCES_TILE_MANAGER_H_ 192 #endif // CC_RESOURCES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | cc/resources/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698