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 <vector> | 10 #include <vector> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void AssignGpuMemoryToTiles(); | 94 void AssignGpuMemoryToTiles(); |
95 void FreeResourcesForTile(Tile*); | 95 void FreeResourcesForTile(Tile*); |
96 void ScheduleManageTiles(); | 96 void ScheduleManageTiles(); |
97 void ScheduleCheckForCompletedSetPixels(); | 97 void ScheduleCheckForCompletedSetPixels(); |
98 void DispatchMoreTasks(); | 98 void DispatchMoreTasks(); |
99 void DispatchOneRasterTask(RasterThread*, scoped_refptr<Tile>); | 99 void DispatchOneRasterTask(RasterThread*, scoped_refptr<Tile>); |
100 void OnRasterTaskCompleted( | 100 void OnRasterTaskCompleted( |
101 scoped_refptr<Tile>, | 101 scoped_refptr<Tile>, |
102 scoped_ptr<ResourcePool::Resource>, | 102 scoped_ptr<ResourcePool::Resource>, |
103 scoped_refptr<PicturePileImpl>, | 103 scoped_refptr<PicturePileImpl>, |
| 104 int manage_tiles_call_count_when_dispatched, |
104 RenderingStats*); | 105 RenderingStats*); |
105 void DidFinishTileInitialization(Tile*); | 106 void DidFinishTileInitialization(Tile*); |
106 void DispatchImageDecodingTasksForTile(Tile*); | 107 void DispatchImageDecodingTasksForTile(Tile*); |
107 void OnImageDecodingTaskCompleted(scoped_refptr<Tile>, uint32_t); | 108 void OnImageDecodingTaskCompleted(scoped_refptr<Tile>, uint32_t); |
108 void DispatchOneImageDecodingTask( | 109 void DispatchOneImageDecodingTask( |
109 RasterThread*, scoped_refptr<Tile>, skia::LazyPixelRef*); | 110 RasterThread*, scoped_refptr<Tile>, skia::LazyPixelRef*); |
110 RasterThread* GetFreeRasterThread(); | 111 RasterThread* GetFreeRasterThread(); |
111 | 112 |
112 TileManagerClient* client_; | 113 TileManagerClient* client_; |
113 scoped_ptr<ResourcePool> resource_pool_; | 114 scoped_ptr<ResourcePool> resource_pool_; |
114 bool manage_tiles_pending_; | 115 bool manage_tiles_pending_; |
| 116 int manage_tiles_call_count_; |
115 bool check_for_completed_set_pixels_pending_; | 117 bool check_for_completed_set_pixels_pending_; |
116 | 118 |
117 GlobalStateThatImpactsTilePriority global_state_; | 119 GlobalStateThatImpactsTilePriority global_state_; |
118 | 120 |
119 typedef std::vector<Tile*> TileVector; | 121 typedef std::vector<Tile*> TileVector; |
120 TileVector tiles_; | 122 TileVector tiles_; |
121 TileVector tiles_that_need_to_be_rasterized_; | 123 TileVector tiles_that_need_to_be_rasterized_; |
122 | 124 |
123 typedef std::list<Tile*> TileList; | 125 typedef std::list<Tile*> TileList; |
124 // Tiles with image decoding tasks. These tiles need to be rasterized | 126 // Tiles with image decoding tasks. These tiles need to be rasterized |
(...skipping 10 matching lines...) Expand all Loading... |
135 RasterThreadVector raster_threads_; | 137 RasterThreadVector raster_threads_; |
136 | 138 |
137 RenderingStats rendering_stats_; | 139 RenderingStats rendering_stats_; |
138 | 140 |
139 DISALLOW_COPY_AND_ASSIGN(TileManager); | 141 DISALLOW_COPY_AND_ASSIGN(TileManager); |
140 }; | 142 }; |
141 | 143 |
142 } // namespace cc | 144 } // namespace cc |
143 | 145 |
144 #endif // CC_TILE_MANAGER_H_ | 146 #endif // CC_TILE_MANAGER_H_ |
OLD | NEW |