| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index b27fa8642999e14dcfbedb153a6edcac3bc616c1..087778a49fffb0359dfd0fddf9e6d812c8126543 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/containers/hash_tables.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/values.h"
|
| +#include "cc/base/ref_counted_managed.h"
|
| #include "cc/base/unique_notifier.h"
|
| #include "cc/resources/eviction_tile_priority_queue.h"
|
| #include "cc/resources/memory_history.h"
|
| @@ -85,7 +86,8 @@ RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats);
|
| // should no longer have any memory assigned to them. Tile objects are "owned"
|
| // by layers; they automatically register with the manager when they are
|
| // created, and unregister from the manager when they are deleted.
|
| -class CC_EXPORT TileManager : public TileTaskRunnerClient {
|
| +class CC_EXPORT TileManager : public TileTaskRunnerClient,
|
| + public RefCountedManager<Tile> {
|
| public:
|
| enum NamedTaskSet {
|
| REQUIRED_FOR_ACTIVATION,
|
| @@ -116,13 +118,13 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient {
|
|
|
| void UpdateVisibleTiles(const GlobalStateThatImpactsTilePriority& state);
|
|
|
| - ScopedTilePtr CreateTile(RasterSource* raster_source,
|
| - const gfx::Size& desired_texture_size,
|
| - const gfx::Rect& content_rect,
|
| - float contents_scale,
|
| - int layer_id,
|
| - int source_frame_number,
|
| - int flags);
|
| + scoped_refptr<Tile> CreateTile(RasterSource* raster_source,
|
| + const gfx::Size& desired_texture_size,
|
| + const gfx::Rect& content_rect,
|
| + float contents_scale,
|
| + int layer_id,
|
| + int source_frame_number,
|
| + int flags);
|
|
|
| bool IsReadyToActivate() const;
|
| bool IsReadyToDraw() const;
|
| @@ -190,9 +192,9 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient {
|
| void FreeResourcesForReleasedTiles();
|
| void CleanUpReleasedTiles();
|
|
|
| + // Overriden from RefCountedManager<Tile>:
|
| friend class Tile;
|
| - // Virtual for testing.
|
| - virtual void Release(Tile* tile);
|
| + void Release(Tile* tile) override;
|
|
|
| // Overriden from TileTaskRunnerClient:
|
| void DidFinishRunningTileTasks(TaskSet task_set) override;
|
|
|