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