OLD | NEW |
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 <set> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "cc/memory_history.h" | 16 #include "cc/memory_history.h" |
16 #include "cc/rendering_stats.h" | 17 #include "cc/rendering_stats.h" |
17 #include "cc/resource_pool.h" | 18 #include "cc/resource_pool.h" |
18 #include "cc/tile_priority.h" | 19 #include "cc/tile_priority.h" |
19 | 20 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 186 |
186 TileManagerClient* client_; | 187 TileManagerClient* client_; |
187 scoped_ptr<ResourcePool> resource_pool_; | 188 scoped_ptr<ResourcePool> resource_pool_; |
188 scoped_ptr<RasterWorkerPool> raster_worker_pool_; | 189 scoped_ptr<RasterWorkerPool> raster_worker_pool_; |
189 bool manage_tiles_pending_; | 190 bool manage_tiles_pending_; |
190 int manage_tiles_call_count_; | 191 int manage_tiles_call_count_; |
191 | 192 |
192 GlobalStateThatImpactsTilePriority global_state_; | 193 GlobalStateThatImpactsTilePriority global_state_; |
193 | 194 |
194 typedef std::vector<Tile*> TileVector; | 195 typedef std::vector<Tile*> TileVector; |
195 TileVector all_tiles_; | 196 typedef std::set<Tile*> TileSet; |
| 197 TileSet all_tiles_; |
196 TileVector live_or_allocated_tiles_; | 198 TileVector live_or_allocated_tiles_; |
197 TileVector tiles_that_need_to_be_rasterized_; | 199 TileVector tiles_that_need_to_be_rasterized_; |
198 | 200 |
199 typedef std::list<Tile*> TileList; | 201 typedef std::list<Tile*> TileList; |
200 // Tiles with image decoding tasks. These tiles need to be rasterized | 202 // Tiles with image decoding tasks. These tiles need to be rasterized |
201 // when all the image decoding tasks finish. | 203 // when all the image decoding tasks finish. |
202 TileList tiles_with_image_decoding_tasks_; | 204 TileList tiles_with_image_decoding_tasks_; |
203 | 205 |
204 typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap; | 206 typedef base::hash_map<uint32_t, skia::LazyPixelRef*> PixelRefMap; |
205 PixelRefMap pending_decode_tasks_; | 207 PixelRefMap pending_decode_tasks_; |
206 | 208 |
207 typedef std::queue<scoped_refptr<Tile> > TileQueue; | 209 typedef std::queue<scoped_refptr<Tile> > TileQueue; |
208 TileQueue tiles_with_pending_set_pixels_; | 210 TileQueue tiles_with_pending_set_pixels_; |
209 size_t bytes_pending_set_pixels_; | 211 size_t bytes_pending_set_pixels_; |
210 bool ever_exceeded_memory_budget_; | 212 bool ever_exceeded_memory_budget_; |
211 MemoryHistory::Entry memory_stats_from_last_assign_; | 213 MemoryHistory::Entry memory_stats_from_last_assign_; |
212 | 214 |
213 bool record_rendering_stats_; | 215 bool record_rendering_stats_; |
214 RenderingStats rendering_stats_; | 216 RenderingStats rendering_stats_; |
215 | 217 |
216 bool use_cheapness_estimator_; | 218 bool use_cheapness_estimator_; |
217 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; | 219 int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS]; |
218 | 220 |
219 DISALLOW_COPY_AND_ASSIGN(TileManager); | 221 DISALLOW_COPY_AND_ASSIGN(TileManager); |
220 }; | 222 }; |
221 | 223 |
222 } // namespace cc | 224 } // namespace cc |
223 | 225 |
224 #endif // CC_TILE_MANAGER_H_ | 226 #endif // CC_TILE_MANAGER_H_ |
OLD | NEW |