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_TILES_TILE_MANAGER_H_ | 5 #ifndef CC_TILES_TILE_MANAGER_H_ |
6 #define CC_TILES_TILE_MANAGER_H_ | 6 #define CC_TILES_TILE_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 | 191 |
192 void SetMoreTilesNeedToBeRasterizedForTesting() { | 192 void SetMoreTilesNeedToBeRasterizedForTesting() { |
193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; | 193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; |
194 } | 194 } |
195 | 195 |
196 bool HasScheduledTileTasksForTesting() const { | 196 bool HasScheduledTileTasksForTesting() const { |
197 return has_scheduled_tile_tasks_; | 197 return has_scheduled_tile_tasks_; |
198 } | 198 } |
199 | 199 |
200 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, | 200 static void OnRasterTaskCompleted( |
201 Tile* tile, | 201 std::unique_ptr<RasterBuffer> raster_buffer, |
202 Resource* resource, | 202 TileTask::TaskCompletionInfo* completion_info, |
203 bool was_canceled); | 203 bool was_canceled); |
204 | 204 |
205 protected: | 205 protected: |
206 TileManager(TileManagerClient* client, | 206 TileManager(TileManagerClient* client, |
207 scoped_refptr<base::SequencedTaskRunner> task_runner, | 207 scoped_refptr<base::SequencedTaskRunner> task_runner, |
208 size_t scheduled_raster_task_limit, | 208 size_t scheduled_raster_task_limit, |
209 bool use_partial_raster); | 209 bool use_partial_raster); |
210 | 210 |
211 void FreeResourcesForReleasedTiles(); | 211 void FreeResourcesForReleasedTiles(); |
212 void CleanUpReleasedTiles(); | 212 void CleanUpReleasedTiles(); |
213 | 213 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; | 341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; |
342 | 342 |
343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
344 | 344 |
345 DISALLOW_COPY_AND_ASSIGN(TileManager); | 345 DISALLOW_COPY_AND_ASSIGN(TileManager); |
346 }; | 346 }; |
347 | 347 |
348 } // namespace cc | 348 } // namespace cc |
349 | 349 |
350 #endif // CC_TILES_TILE_MANAGER_H_ | 350 #endif // CC_TILES_TILE_MANAGER_H_ |
OLD | NEW |