| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 void DidModifyTilePriorities(); | 143 void DidModifyTilePriorities(); |
| 144 | 144 |
| 145 std::unique_ptr<Tile> CreateTile(const Tile::CreateInfo& info, | 145 std::unique_ptr<Tile> CreateTile(const Tile::CreateInfo& info, |
| 146 int layer_id, | 146 int layer_id, |
| 147 int source_frame_number, | 147 int source_frame_number, |
| 148 int flags); | 148 int flags); |
| 149 | 149 |
| 150 bool IsReadyToActivate() const; | 150 bool IsReadyToActivate() const; |
| 151 bool IsReadyToDraw() const; | 151 bool IsReadyToDraw() const; |
| 152 | 152 |
| 153 const ImageIdFlatSet& TakeImagesToInvalidateOnSyncTree(); | 153 const PaintImageIdFlatSet& TakeImagesToInvalidateOnSyncTree(); |
| 154 void DidActivateSyncTree(); | 154 void DidActivateSyncTree(); |
| 155 | 155 |
| 156 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 156 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
| 157 BasicStateAsValue() const; | 157 BasicStateAsValue() const; |
| 158 void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const; | 158 void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const; |
| 159 const MemoryHistory::Entry& memory_stats_from_last_assign() const { | 159 const MemoryHistory::Entry& memory_stats_from_last_assign() const { |
| 160 return memory_stats_from_last_assign_; | 160 return memory_stats_from_last_assign_; |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Public methods for testing. | 163 // Public methods for testing. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 void DidFinishRunningTileTasksRequiredForActivation(); | 322 void DidFinishRunningTileTasksRequiredForActivation(); |
| 323 void DidFinishRunningTileTasksRequiredForDraw(); | 323 void DidFinishRunningTileTasksRequiredForDraw(); |
| 324 void DidFinishRunningAllTileTasks(); | 324 void DidFinishRunningAllTileTasks(); |
| 325 | 325 |
| 326 scoped_refptr<TileTask> CreateTaskSetFinishedTask( | 326 scoped_refptr<TileTask> CreateTaskSetFinishedTask( |
| 327 void (TileManager::*callback)()); | 327 void (TileManager::*callback)()); |
| 328 PrioritizedWorkToSchedule AssignGpuMemoryToTiles(); | 328 PrioritizedWorkToSchedule AssignGpuMemoryToTiles(); |
| 329 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule); | 329 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule); |
| 330 | 330 |
| 331 void PartitionImagesForCheckering( | 331 void PartitionImagesForCheckering(const PrioritizedTile& prioritized_tile, |
| 332 const PrioritizedTile& prioritized_tile, | 332 const gfx::ColorSpace& raster_color_space, |
| 333 const gfx::ColorSpace& raster_color_space, | 333 std::vector<DrawImage>* sync_decoded_images, |
| 334 std::vector<DrawImage>* sync_decoded_images, | 334 std::vector<PaintImage>* checkered_images); |
| 335 std::vector<sk_sp<const SkImage>>* checkered_images); | |
| 336 void AddCheckeredImagesToDecodeQueue( | 335 void AddCheckeredImagesToDecodeQueue( |
| 337 const PrioritizedTile& prioritized_tile, | 336 const PrioritizedTile& prioritized_tile, |
| 338 const gfx::ColorSpace& raster_color_space, | 337 const gfx::ColorSpace& raster_color_space, |
| 339 CheckerImageTracker::ImageDecodeQueue* image_decode_queue); | 338 CheckerImageTracker::ImageDecodeQueue* image_decode_queue); |
| 340 | 339 |
| 341 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 340 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
| 342 ScheduledTasksStateAsValue() const; | 341 ScheduledTasksStateAsValue() const; |
| 343 | 342 |
| 344 bool UsePartialRaster() const; | 343 bool UsePartialRaster() const; |
| 345 | 344 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; | 402 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; |
| 404 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated. | 403 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated. |
| 405 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_; | 404 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_; |
| 406 | 405 |
| 407 DISALLOW_COPY_AND_ASSIGN(TileManager); | 406 DISALLOW_COPY_AND_ASSIGN(TileManager); |
| 408 }; | 407 }; |
| 409 | 408 |
| 410 } // namespace cc | 409 } // namespace cc |
| 411 | 410 |
| 412 #endif // CC_TILES_TILE_MANAGER_H_ | 411 #endif // CC_TILES_TILE_MANAGER_H_ |
| OLD | NEW |