| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 bool HasScheduledTileTasksForTesting() const { | 204 bool HasScheduledTileTasksForTesting() const { |
| 205 return has_scheduled_tile_tasks_; | 205 return has_scheduled_tile_tasks_; |
| 206 } | 206 } |
| 207 | 207 |
| 208 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, | 208 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, |
| 209 Tile* tile, | 209 Tile* tile, |
| 210 Resource* resource, | 210 Resource* resource, |
| 211 bool was_canceled); | 211 bool was_canceled); |
| 212 | 212 |
| 213 void NotifyFrameFinished(); |
| 214 |
| 213 protected: | 215 protected: |
| 214 void FreeResourcesForReleasedTiles(); | 216 void FreeResourcesForReleasedTiles(); |
| 215 void CleanUpReleasedTiles(); | 217 void CleanUpReleasedTiles(); |
| 216 | 218 |
| 217 friend class Tile; | 219 friend class Tile; |
| 218 // Virtual for testing. | 220 // Virtual for testing. |
| 219 virtual void Release(Tile* tile); | 221 virtual void Release(Tile* tile); |
| 220 Tile::Id GetUniqueTileId() { return ++next_tile_id_; } | 222 Tile::Id GetUniqueTileId() { return ++next_tile_id_; } |
| 221 | 223 |
| 222 private: | 224 private: |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 std::vector<scoped_refptr<TileTask>> locked_image_tasks_; | 346 std::vector<scoped_refptr<TileTask>> locked_image_tasks_; |
| 345 | 347 |
| 346 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 348 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
| 347 | 349 |
| 348 DISALLOW_COPY_AND_ASSIGN(TileManager); | 350 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 349 }; | 351 }; |
| 350 | 352 |
| 351 } // namespace cc | 353 } // namespace cc |
| 352 | 354 |
| 353 #endif // CC_TILES_TILE_MANAGER_H_ | 355 #endif // CC_TILES_TILE_MANAGER_H_ |
| OLD | NEW |