| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index 0af823ed9c24fb309d49f77b8f1d33eb8c864a73..71e87ed3c0a949c7dd143549ad8e6a577a4ebeb7 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -59,24 +59,14 @@ class CC_EXPORT TileManagerClient {
|
| // - Tile marked for on-demand raster.
|
| virtual void NotifyTileStateChanged(const Tile* tile) = 0;
|
|
|
| - // Given an empty raster tile priority queue, this will build a priority queue
|
| - // that will return tiles in order in which they should be rasterized.
|
| - // Note if the queue was previous built, Reset must be called on it.
|
| - virtual scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
|
| - TreePriority tree_priority,
|
| - RasterTilePriorityQueue::Type type) = 0;
|
| -
|
| - // Given an empty eviction tile priority queue, this will build a priority
|
| - // queue that will return tiles in order in which they should be evicted.
|
| - // Note if the queue was previous built, Reset must be called on it.
|
| - virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
|
| - TreePriority tree_priority) = 0;
|
| -
|
| // Informs the client that due to the currently rasterizing (or scheduled to
|
| // be rasterized) tiles, we will be in a position that will likely require a
|
| // draw. This can be used to preemptively start a frame.
|
| virtual void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) = 0;
|
|
|
| + // Returns true iff we have a pending tree.
|
| + virtual bool PendingTreeExists() = 0;
|
| +
|
| protected:
|
| virtual ~TileManagerClient() {}
|
| };
|
| @@ -118,6 +108,11 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| size_t scheduled_raster_task_limit);
|
| ~TileManager() override;
|
|
|
| + void RegisterPictureLayerTilingSet(int layer_id,
|
| + WhichTree tree,
|
| + PictureLayerTilingSet* tiling_set);
|
| + void UnregisterPictureLayerTilingSet(int layer_id, WhichTree tree);
|
| +
|
| // 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.
|
| @@ -127,6 +122,10 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
|
|
| void UpdateVisibleTiles(const GlobalStateThatImpactsTilePriority& state);
|
|
|
| + bool HasPictureLayerTilingSets() const {
|
| + return !paired_picture_layer_tiling_sets_.empty();
|
| + }
|
| +
|
| scoped_refptr<Tile> CreateTile(RasterSource* raster_source,
|
| const gfx::Size& desired_texture_size,
|
| const gfx::Rect& content_rect,
|
| @@ -186,6 +185,10 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| bool IsReadyToActivate() const;
|
| bool IsReadyToDraw() const;
|
|
|
| + scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
|
| + RasterTilePriorityQueue::Type type) const;
|
| + scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue() const;
|
| +
|
| protected:
|
| TileManager(TileManagerClient* client,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner,
|
| @@ -319,6 +322,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| bool did_notify_ready_to_activate_;
|
| bool did_notify_ready_to_draw_;
|
|
|
| + base::hash_map<int, PictureLayerTilingSet::Pair>
|
| + paired_picture_layer_tiling_sets_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TileManager);
|
| };
|
|
|
|
|