| 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 <deque> | 8 #include <deque> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 TileManagerClient* client, | 97 TileManagerClient* client, |
| 98 base::SequencedTaskRunner* task_runner, | 98 base::SequencedTaskRunner* task_runner, |
| 99 ResourcePool* resource_pool, | 99 ResourcePool* resource_pool, |
| 100 Rasterizer* rasterizer, | 100 Rasterizer* rasterizer, |
| 101 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 101 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 102 size_t scheduled_raster_task_limit); | 102 size_t scheduled_raster_task_limit); |
| 103 ~TileManager() override; | 103 ~TileManager() override; |
| 104 | 104 |
| 105 void ManageTiles(const GlobalStateThatImpactsTilePriority& state); | 105 void ManageTiles(const GlobalStateThatImpactsTilePriority& state); |
| 106 | 106 |
| 107 // Returns true when visible tiles have been initialized. | 107 void UpdateVisibleTiles(); |
| 108 bool UpdateVisibleTiles(); | |
| 109 | 108 |
| 110 scoped_refptr<Tile> CreateTile(RasterSource* raster_source, | 109 scoped_refptr<Tile> CreateTile(RasterSource* raster_source, |
| 111 const gfx::Size& tile_size, | 110 const gfx::Size& tile_size, |
| 112 const gfx::Rect& content_rect, | 111 const gfx::Rect& content_rect, |
| 113 float contents_scale, | 112 float contents_scale, |
| 114 int layer_id, | 113 int layer_id, |
| 115 int source_frame_number, | 114 int source_frame_number, |
| 116 int flags); | 115 int flags); |
| 117 | 116 |
| 118 scoped_refptr<base::debug::ConvertableToTraceFormat> BasicStateAsValue() | 117 scoped_refptr<base::debug::ConvertableToTraceFormat> BasicStateAsValue() |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 const size_t scheduled_raster_task_limit_; | 240 const size_t scheduled_raster_task_limit_; |
| 242 | 241 |
| 243 typedef base::hash_map<Tile::Id, Tile*> TileMap; | 242 typedef base::hash_map<Tile::Id, Tile*> TileMap; |
| 244 TileMap tiles_; | 243 TileMap tiles_; |
| 245 | 244 |
| 246 bool all_tiles_that_need_to_be_rasterized_are_scheduled_; | 245 bool all_tiles_that_need_to_be_rasterized_are_scheduled_; |
| 247 MemoryHistory::Entry memory_stats_from_last_assign_; | 246 MemoryHistory::Entry memory_stats_from_last_assign_; |
| 248 | 247 |
| 249 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 248 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 250 | 249 |
| 251 bool did_initialize_visible_tile_; | |
| 252 bool did_check_for_completed_tasks_since_last_schedule_tasks_; | 250 bool did_check_for_completed_tasks_since_last_schedule_tasks_; |
| 253 bool did_oom_on_last_assign_; | 251 bool did_oom_on_last_assign_; |
| 254 | 252 |
| 255 typedef base::hash_map<uint32_t, scoped_refptr<ImageDecodeTask>> | 253 typedef base::hash_map<uint32_t, scoped_refptr<ImageDecodeTask>> |
| 256 PixelRefTaskMap; | 254 PixelRefTaskMap; |
| 257 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; | 255 typedef base::hash_map<int, PixelRefTaskMap> LayerPixelRefTaskMap; |
| 258 LayerPixelRefTaskMap image_decode_tasks_; | 256 LayerPixelRefTaskMap image_decode_tasks_; |
| 259 | 257 |
| 260 typedef base::hash_map<int, int> LayerCountMap; | 258 typedef base::hash_map<int, int> LayerCountMap; |
| 261 LayerCountMap used_layer_counts_; | 259 LayerCountMap used_layer_counts_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 276 RasterTilePriorityQueue raster_priority_queue_; | 274 RasterTilePriorityQueue raster_priority_queue_; |
| 277 EvictionTilePriorityQueue eviction_priority_queue_; | 275 EvictionTilePriorityQueue eviction_priority_queue_; |
| 278 bool eviction_priority_queue_is_up_to_date_; | 276 bool eviction_priority_queue_is_up_to_date_; |
| 279 | 277 |
| 280 DISALLOW_COPY_AND_ASSIGN(TileManager); | 278 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 281 }; | 279 }; |
| 282 | 280 |
| 283 } // namespace cc | 281 } // namespace cc |
| 284 | 282 |
| 285 #endif // CC_RESOURCES_TILE_MANAGER_H_ | 283 #endif // CC_RESOURCES_TILE_MANAGER_H_ |
| OLD | NEW |