| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void SetMoreTilesNeedToBeRasterizedForTesting() { | 189 void SetMoreTilesNeedToBeRasterizedForTesting() { |
| 190 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; | 190 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool HasScheduledTileTasksForTesting() const { | 193 bool HasScheduledTileTasksForTesting() const { |
| 194 return has_scheduled_tile_tasks_; | 194 return has_scheduled_tile_tasks_; |
| 195 } | 195 } |
| 196 | 196 |
| 197 protected: | 197 protected: |
| 198 TileManager(TileManagerClient* client, | 198 TileManager(TileManagerClient* client, |
| 199 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 199 scoped_refptr<base::SequencedTaskRunner> task_runner, |
| 200 size_t scheduled_raster_task_limit, | 200 size_t scheduled_raster_task_limit, |
| 201 bool use_partial_raster); | 201 bool use_partial_raster); |
| 202 | 202 |
| 203 void FreeResourcesForReleasedTiles(); | 203 void FreeResourcesForReleasedTiles(); |
| 204 void CleanUpReleasedTiles(); | 204 void CleanUpReleasedTiles(); |
| 205 | 205 |
| 206 friend class Tile; | 206 friend class Tile; |
| 207 // Virtual for testing. | 207 // Virtual for testing. |
| 208 virtual void Release(Tile* tile); | 208 virtual void Release(Tile* tile); |
| 209 Tile::Id GetUniqueTileId() { return ++next_tile_id_; } | 209 Tile::Id GetUniqueTileId() { return ++next_tile_id_; } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; | 337 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; |
| 338 | 338 |
| 339 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 339 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
| 340 | 340 |
| 341 DISALLOW_COPY_AND_ASSIGN(TileManager); | 341 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 } // namespace cc | 344 } // namespace cc |
| 345 | 345 |
| 346 #endif // CC_TILES_TILE_MANAGER_H_ | 346 #endif // CC_TILES_TILE_MANAGER_H_ |
| OLD | NEW |