| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index a5005bf7f3cce2da6d11082e5567633af2468a1a..4cc80904cbbc9919431a84579aa5e2d493ab78e3 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -17,6 +17,7 @@
|
| #include "cc/base/ref_counted_managed.h"
|
| #include "cc/base/unique_notifier.h"
|
| #include "cc/resources/eviction_tile_priority_queue.h"
|
| +#include "cc/resources/gpu_rasterizer.h"
|
| #include "cc/resources/managed_tile_state.h"
|
| #include "cc/resources/memory_history.h"
|
| #include "cc/resources/raster_source.h"
|
| @@ -96,14 +97,16 @@ 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;
|
|
|
| + void PrepareTilesBeforeDraw(const GlobalStateThatImpactsTilePriority& state);
|
| +
|
| // Assigns tile memory and schedules work to prepare tiles for drawing.
|
| // - Runs client_->NotifyReadyToActivate() when all tiles required for
|
| // activation are prepared, or failed to prepare due to OOM.
|
| @@ -169,11 +172,16 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| scheduled_raster_task_limit_ = limit;
|
| }
|
|
|
| + void CompleteRasterTask(Tile::Id tile,
|
| + scoped_ptr<ScopedResource> resource,
|
| + const RasterSource::SolidColorAnalysis& analysis);
|
| +
|
| protected:
|
| TileManager(TileManagerClient* client,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner,
|
| ResourcePool* resource_pool,
|
| TileTaskRunner* tile_task_runner,
|
| + Rasterizer* rasterizer,
|
| size_t scheduled_raster_task_limit);
|
|
|
| void FreeResourcesForReleasedTiles();
|
| @@ -194,7 +202,9 @@ 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);
|
|
|
| private:
|
| class MemoryUsage {
|
| @@ -241,6 +251,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();
|
|
|
| @@ -248,6 +260,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_;
|
|
|
| @@ -279,6 +292,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_;
|
|
|
|
|