| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index 7a1e4609e0e469fa7d546cc9aff95d7ca4f64b54..5897a225e2a338e9fc96d46a125b8839e2e3298d 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -34,6 +34,7 @@ class TracedValue;
|
|
|
| namespace cc {
|
| class PictureLayerImpl;
|
| +class Rasterizer;
|
| class ResourceProvider;
|
|
|
| class CC_EXPORT TileManagerClient {
|
| @@ -96,12 +97,12 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| // rasterizer.h
|
| };
|
|
|
| - static scoped_ptr<TileManager> Create(
|
| - TileManagerClient* client,
|
| - base::SequencedTaskRunner* task_runner,
|
| - ResourcePool* resource_pool,
|
| - TileTaskRunner* tile_task_runner,
|
| - size_t scheduled_raster_task_limit);
|
| + static scoped_ptr<TileManager> Create(TileManagerClient* client,
|
| + base::SequencedTaskRunner* task_runner,
|
| + ResourcePool* resource_pool,
|
| + TileTaskRunner* tile_task_runner,
|
| + Rasterizer* rasterizer,
|
| + size_t scheduled_raster_task_limit);
|
| ~TileManager() override;
|
|
|
| // Assigns tile memory and schedules work to prepare tiles for drawing.
|
| @@ -111,7 +112,7 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| // prepared, or failed to prepare due to OOM.
|
| void PrepareTiles(const GlobalStateThatImpactsTilePriority& state);
|
|
|
| - void UpdateVisibleTiles();
|
| + void UpdateVisibleTiles(const GlobalStateThatImpactsTilePriority& state);
|
|
|
| scoped_refptr<Tile> CreateTile(RasterSource* raster_source,
|
| const gfx::Size& tile_size,
|
| @@ -172,6 +173,7 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner,
|
| ResourcePool* resource_pool,
|
| TileTaskRunner* tile_task_runner,
|
| + Rasterizer* rasterizer,
|
| size_t scheduled_raster_task_limit);
|
|
|
| void FreeResourcesForReleasedTiles();
|
| @@ -192,7 +194,12 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| virtual void ScheduleTasks(
|
| const TileVector& tiles_that_need_to_be_rasterized);
|
|
|
| - void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized);
|
| + void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized,
|
| + size_t scheduled_raser_task_limit,
|
| + bool required_for_draw_only);
|
| +
|
| + void SynchronouslyRasterizeTiles(
|
| + const GlobalStateThatImpactsTilePriority& state);
|
|
|
| private:
|
| class MemoryUsage {
|
| @@ -239,6 +246,8 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority);
|
| bool IsReadyToActivate() const;
|
| bool IsReadyToDraw() const;
|
| + void NotifyReadyToActivate();
|
| + void NotifyReadyToDraw();
|
| void CheckIfReadyToActivate();
|
| void CheckIfReadyToDraw();
|
|
|
| @@ -246,6 +255,7 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
| ResourcePool* resource_pool_;
|
| TileTaskRunner* tile_task_runner_;
|
| + Rasterizer* rasterizer_;
|
| GlobalStateThatImpactsTilePriority global_state_;
|
| size_t scheduled_raster_task_limit_;
|
|
|
| @@ -277,6 +287,8 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
|
|
| std::vector<scoped_refptr<RasterTask>> orphan_raster_tasks_;
|
|
|
| + UniqueNotifier ready_to_activate_notifier_;
|
| + UniqueNotifier ready_to_draw_notifier_;
|
| UniqueNotifier ready_to_activate_check_notifier_;
|
| UniqueNotifier ready_to_draw_check_notifier_;
|
|
|
|
|