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

Side by Side Diff: cc/tile_manager.h

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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 | « cc/texture_layer.cc ('k') | cc/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_TILE_MANAGER_H_ 5 #ifndef CC_TILE_MANAGER_H_
6 #define CC_TILE_MANAGER_H_ 6 #define CC_TILE_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 #include <vector> 10 #include <vector>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }; 86 };
87 87
88 // This class manages tiles, deciding which should get rasterized and which 88 // This class manages tiles, deciding which should get rasterized and which
89 // should no longer have any memory assigned to them. Tile objects are "owned" 89 // should no longer have any memory assigned to them. Tile objects are "owned"
90 // by layers; they automatically register with the manager when they are 90 // by layers; they automatically register with the manager when they are
91 // created, and unregister from the manager when they are deleted. 91 // created, and unregister from the manager when they are deleted.
92 class CC_EXPORT TileManager { 92 class CC_EXPORT TileManager {
93 public: 93 public:
94 TileManager(TileManagerClient* client, 94 TileManager(TileManagerClient* client,
95 ResourceProvider *resource_provider, 95 ResourceProvider *resource_provider,
96 size_t num_raster_threads); 96 size_t num_raster_threads,
97 bool record_rendering_stats);
97 virtual ~TileManager(); 98 virtual ~TileManager();
98 99
99 const GlobalStateThatImpactsTilePriority& GlobalState() const { 100 const GlobalStateThatImpactsTilePriority& GlobalState() const {
100 return global_state_; 101 return global_state_;
101 } 102 }
102 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state); 103 void SetGlobalState(const GlobalStateThatImpactsTilePriority& state);
103 104
104 void ManageTiles(); 105 void ManageTiles();
105 void CheckForCompletedTileUploads(); 106 void CheckForCompletedTileUploads();
106 107
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 TileList tiles_with_image_decoding_tasks_; 171 TileList tiles_with_image_decoding_tasks_;
171 172
172 typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap; 173 typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap;
173 PixelRefMap pending_decode_tasks_; 174 PixelRefMap pending_decode_tasks_;
174 175
175 typedef std::queue<scoped_refptr<Tile> > TileQueue; 176 typedef std::queue<scoped_refptr<Tile> > TileQueue;
176 TileQueue tiles_with_pending_set_pixels_; 177 TileQueue tiles_with_pending_set_pixels_;
177 size_t bytes_pending_set_pixels_; 178 size_t bytes_pending_set_pixels_;
178 bool ever_exceeded_memory_budget_; 179 bool ever_exceeded_memory_budget_;
179 180
181 bool record_rendering_stats_;
180 RenderingStats rendering_stats_; 182 RenderingStats rendering_stats_;
181 183
182 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; 184 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS];
183 185
184 DISALLOW_COPY_AND_ASSIGN(TileManager); 186 DISALLOW_COPY_AND_ASSIGN(TileManager);
185 }; 187 };
186 188
187 } // namespace cc 189 } // namespace cc
188 190
189 #endif // CC_TILE_MANAGER_H_ 191 #endif // CC_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/texture_layer.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698