| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 bool AreTilesRequiredForActivationReady() const { | 78 bool AreTilesRequiredForActivationReady() const { |
| 79 return all_tiles_required_for_activation_have_been_initialized_; | 79 return all_tiles_required_for_activation_have_been_initialized_; |
| 80 } | 80 } |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 TileManager(TileManagerClient* client, | 83 TileManager(TileManagerClient* client, |
| 84 ResourceProvider* resource_provider, | 84 ResourceProvider* resource_provider, |
| 85 scoped_ptr<RasterWorkerPool> raster_worker_pool, | 85 scoped_ptr<RasterWorkerPool> raster_worker_pool, |
| 86 size_t num_raster_threads, | 86 size_t num_raster_threads, |
| 87 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 87 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| 88 GLenum texture_format); | |
| 89 | 88 |
| 90 // Methods called by Tile | 89 // Methods called by Tile |
| 91 friend class Tile; | 90 friend class Tile; |
| 92 void RegisterTile(Tile* tile); | 91 void RegisterTile(Tile* tile); |
| 93 void UnregisterTile(Tile* tile); | 92 void UnregisterTile(Tile* tile); |
| 94 | 93 |
| 95 // Overriden from RasterWorkerPoolClient: | 94 // Overriden from RasterWorkerPoolClient: |
| 96 virtual bool ShouldForceTasksRequiredForActivationToComplete() const | 95 virtual bool ShouldForceTasksRequiredForActivationToComplete() const |
| 97 OVERRIDE; | 96 OVERRIDE; |
| 98 virtual void DidFinishRunningTasks() OVERRIDE; | 97 virtual void DidFinishRunningTasks() OVERRIDE; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 bool all_tiles_required_for_activation_have_memory_; | 146 bool all_tiles_required_for_activation_have_memory_; |
| 148 bool all_tiles_required_for_activation_have_been_initialized_; | 147 bool all_tiles_required_for_activation_have_been_initialized_; |
| 149 | 148 |
| 150 bool ever_exceeded_memory_budget_; | 149 bool ever_exceeded_memory_budget_; |
| 151 MemoryHistory::Entry memory_stats_from_last_assign_; | 150 MemoryHistory::Entry memory_stats_from_last_assign_; |
| 152 | 151 |
| 153 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 152 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 154 | 153 |
| 155 bool did_initialize_visible_tile_; | 154 bool did_initialize_visible_tile_; |
| 156 | 155 |
| 157 GLenum texture_format_; | |
| 158 | |
| 159 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; | 156 typedef base::hash_map<uint32_t, RasterWorkerPool::Task> PixelRefTaskMap; |
| 160 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; | 157 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; |
| 161 LayerPixelRefTaskMap image_decode_tasks_; | 158 LayerPixelRefTaskMap image_decode_tasks_; |
| 162 | 159 |
| 163 RasterTaskCompletionStats update_visible_tiles_stats_; | 160 RasterTaskCompletionStats update_visible_tiles_stats_; |
| 164 | 161 |
| 165 DISALLOW_COPY_AND_ASSIGN(TileManager); | 162 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 166 }; | 163 }; |
| 167 | 164 |
| 168 } // namespace cc | 165 } // namespace cc |
| 169 | 166 |
| 170 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 167 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
| OLD | NEW |