| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index ea22fd8dae27718ebaef0cc4c064eead45adf751..263700825df8b686ddc81b306e9e7cdef6516dc6 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -32,8 +32,15 @@ class ResourceProvider;
|
|
|
| class CC_EXPORT TileManagerClient {
|
| public:
|
| + // Called when all tiles marked as required for activation are ready to draw.
|
| virtual void NotifyReadyToActivate() = 0;
|
| - virtual void NotifyTileInitialized(const Tile* tile) = 0;
|
| +
|
| + // Called when the visible representation of a tile might have changed. Some
|
| + // examples are:
|
| + // - Tile version initialized.
|
| + // - Tile resources freed.
|
| + // - Tile marked for on-demand raster.
|
| + virtual void NotifyTileStateChanged(const Tile* tile) = 0;
|
|
|
| protected:
|
| virtual ~TileManagerClient() {}
|
| @@ -156,10 +163,10 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
|
|
| static scoped_ptr<TileManager> Create(
|
| TileManagerClient* client,
|
| + base::SequencedTaskRunner* task_runner,
|
| ResourcePool* resource_pool,
|
| Rasterizer* rasterizer,
|
| Rasterizer* gpu_rasterizer,
|
| - bool use_rasterize_on_demand,
|
| RenderingStatsInstrumentation* rendering_stats_instrumentation);
|
| virtual ~TileManager();
|
|
|
| @@ -232,10 +239,10 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
|
|
| protected:
|
| TileManager(TileManagerClient* client,
|
| + base::SequencedTaskRunner* task_runner,
|
| ResourcePool* resource_pool,
|
| Rasterizer* rasterizer,
|
| Rasterizer* gpu_rasterizer,
|
| - bool use_rasterize_on_demand,
|
| RenderingStatsInstrumentation* rendering_stats_instrumentation);
|
|
|
| // Methods called by Tile
|
| @@ -287,6 +294,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| void FreeResourceForTile(Tile* tile, RasterMode mode);
|
| void FreeResourcesForTile(Tile* tile);
|
| void FreeUnusedResourcesForTile(Tile* tile);
|
| + void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile);
|
| scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile,
|
| SkPixelRef* pixel_ref);
|
| scoped_refptr<RasterTask> CreateRasterTask(Tile* tile);
|
| @@ -294,7 +302,12 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| void UpdatePrioritizedTileSetIfNeeded();
|
| void CleanUpLayers();
|
|
|
| + bool IsReadyToActivate() const;
|
| + void ScheduleCheckIfReadyToActivate();
|
| + void CheckIfReadyToActivate();
|
| +
|
| TileManagerClient* client_;
|
| + scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
| ResourcePool* resource_pool_;
|
| scoped_ptr<RasterizerDelegate> rasterizer_delegate_;
|
| GlobalStateThatImpactsTilePriority global_state_;
|
| @@ -334,8 +347,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
|
|
| std::vector<Tile*> released_tiles_;
|
|
|
| - bool use_rasterize_on_demand_;
|
| -
|
| ResourceFormat resource_format_;
|
|
|
| // Queues used when scheduling raster tasks.
|
| @@ -345,6 +356,10 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
|
|
| std::vector<PictureLayerImpl*> layers_;
|
|
|
| + bool check_if_ready_to_activate_pending_;
|
| +
|
| + base::WeakPtrFactory<TileManager> weak_ptr_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TileManager);
|
| };
|
|
|
|
|