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_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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated(); | 96 bytes_releasable_ += tiles[i]->bytes_consumed_if_allocated(); |
97 ++resources_releasable_; | 97 ++resources_releasable_; |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 protected: | 101 protected: |
102 TileManager(TileManagerClient* client, | 102 TileManager(TileManagerClient* client, |
103 ResourceProvider* resource_provider, | 103 ResourceProvider* resource_provider, |
104 scoped_ptr<RasterWorkerPool> raster_worker_pool, | 104 scoped_ptr<RasterWorkerPool> raster_worker_pool, |
105 size_t num_raster_threads, | 105 size_t num_raster_threads, |
106 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 106 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
107 GLenum texture_format); | |
108 | 107 |
109 // Methods called by Tile | 108 // Methods called by Tile |
110 friend class Tile; | 109 friend class Tile; |
111 void RegisterTile(Tile* tile); | 110 void RegisterTile(Tile* tile); |
112 void UnregisterTile(Tile* tile); | 111 void UnregisterTile(Tile* tile); |
113 | 112 |
114 // Overriden from RasterWorkerPoolClient: | 113 // Overriden from RasterWorkerPoolClient: |
115 virtual bool ShouldForceTasksRequiredForActivationToComplete() const | 114 virtual bool ShouldForceTasksRequiredForActivationToComplete() const |
116 OVERRIDE; | 115 OVERRIDE; |
117 virtual void DidFinishRunningTasks() OVERRIDE; | 116 virtual void DidFinishRunningTasks() OVERRIDE; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 size_t bytes_releasable_; | 168 size_t bytes_releasable_; |
170 size_t resources_releasable_; | 169 size_t resources_releasable_; |
171 | 170 |
172 bool ever_exceeded_memory_budget_; | 171 bool ever_exceeded_memory_budget_; |
173 MemoryHistory::Entry memory_stats_from_last_assign_; | 172 MemoryHistory::Entry memory_stats_from_last_assign_; |
174 | 173 |
175 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 174 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
176 | 175 |
177 bool did_initialize_visible_tile_; | 176 bool did_initialize_visible_tile_; |
178 | 177 |
179 GLenum texture_format_; | |
180 | |
181 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; | 178 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; |
182 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; | 179 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; |
183 LayerPixelRefTaskMap image_decode_tasks_; | 180 LayerPixelRefTaskMap image_decode_tasks_; |
184 | 181 |
185 RasterTaskCompletionStats update_visible_tiles_stats_; | 182 RasterTaskCompletionStats update_visible_tiles_stats_; |
186 | 183 |
187 DISALLOW_COPY_AND_ASSIGN(TileManager); | 184 DISALLOW_COPY_AND_ASSIGN(TileManager); |
188 }; | 185 }; |
189 | 186 |
190 } // namespace cc | 187 } // namespace cc |
191 | 188 |
192 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 189 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
OLD | NEW |