| Index: cc/resources/tile_manager.h
|
| diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
|
| index e3abb1937e0d9b694180f8fda9d92e84a56ae573..87e91630cc91f0a0f6f8c70bb69123ad8bacaf78 100644
|
| --- a/cc/resources/tile_manager.h
|
| +++ b/cc/resources/tile_manager.h
|
| @@ -20,7 +20,6 @@
|
| #include "cc/resources/managed_tile_state.h"
|
| #include "cc/resources/memory_history.h"
|
| #include "cc/resources/picture_pile_impl.h"
|
| -#include "cc/resources/prioritized_tile_set.h"
|
| #include "cc/resources/rasterizer.h"
|
| #include "cc/resources/resource_pool.h"
|
| #include "cc/resources/tile.h"
|
| @@ -64,11 +63,15 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| class CC_EXPORT RasterTileIterator {
|
| public:
|
| RasterTileIterator(TileManager* tile_manager, TreePriority tree_priority);
|
| + RasterTileIterator(const RasterTileIterator& other);
|
| ~RasterTileIterator();
|
|
|
| RasterTileIterator& operator++();
|
| operator bool() const;
|
| Tile* operator*();
|
| + RasterTileIterator& operator=(const RasterTileIterator& other);
|
| +
|
| + bool HasTilesRequiredForActivation() const;
|
|
|
| private:
|
| struct PairedPictureLayerIterator {
|
| @@ -107,12 +110,14 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| struct CC_EXPORT EvictionTileIterator {
|
| public:
|
| EvictionTileIterator();
|
| + EvictionTileIterator(const EvictionTileIterator& other);
|
| EvictionTileIterator(TileManager* tile_manager, TreePriority tree_priority);
|
| ~EvictionTileIterator();
|
|
|
| EvictionTileIterator& operator++();
|
| - operator bool() const;
|
| + operator bool();
|
| Tile* operator*();
|
| + EvictionTileIterator& operator=(const EvictionTileIterator& other);
|
|
|
| private:
|
| struct PairedPictureLayerIterator {
|
| @@ -142,6 +147,10 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| TreePriority tree_priority_;
|
| };
|
|
|
| + void Initialize();
|
| +
|
| + bool initialized_;
|
| + TileManager* tile_manager_;
|
| std::vector<PairedPictureLayerIterator> paired_iterators_;
|
| std::vector<PairedPictureLayerIterator*> iterator_heap_;
|
| TreePriority tree_priority_;
|
| @@ -214,10 +223,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| const GlobalStateThatImpactsTilePriority& state) {
|
| // Soft limit is used for resource pool such that
|
| // memory returns to soft limit after going over.
|
| - if (state != global_state_) {
|
| - global_state_ = state;
|
| - prioritized_tiles_dirty_ = true;
|
| - }
|
| + global_state_ = state;
|
| }
|
|
|
| protected:
|
| @@ -229,13 +235,10 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| bool use_rasterize_on_demand,
|
| RenderingStatsInstrumentation* rendering_stats_instrumentation);
|
|
|
| - // Methods called by Tile
|
| - friend class Tile;
|
| - void DidChangeTilePriority(Tile* tile);
|
| -
|
| void CleanUpReleasedTiles();
|
|
|
| // Overriden from RefCountedManager<Tile>:
|
| + friend class Tile;
|
| virtual void Release(Tile* tile) OVERRIDE;
|
|
|
| // Overriden from RasterizerClient:
|
| @@ -250,9 +253,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| virtual void ScheduleTasks(
|
| const TileVector& tiles_that_need_to_be_rasterized);
|
|
|
| - void AssignGpuMemoryToTiles(PrioritizedTileSet* tiles,
|
| - TileVector* tiles_that_need_to_be_rasterized);
|
| - void GetTilesWithAssignedBins(PrioritizedTileSet* tiles);
|
| + void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized);
|
|
|
| private:
|
| enum RasterizerType {
|
| @@ -282,7 +283,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| SkPixelRef* pixel_ref);
|
| scoped_refptr<RasterTask> CreateRasterTask(Tile* tile);
|
| scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const;
|
| - void UpdatePrioritizedTileSetIfNeeded();
|
|
|
| TileManagerClient* client_;
|
| ResourcePool* resource_pool_;
|
| @@ -292,15 +292,9 @@ class CC_EXPORT TileManager : public RasterizerClient,
|
| typedef base::hash_map<Tile::Id, Tile*> TileMap;
|
| TileMap tiles_;
|
|
|
| - PrioritizedTileSet prioritized_tiles_;
|
| - bool prioritized_tiles_dirty_;
|
| -
|
| bool all_tiles_that_need_to_be_rasterized_have_memory_;
|
| bool all_tiles_required_for_activation_have_memory_;
|
|
|
| - size_t memory_required_bytes_;
|
| - size_t memory_nice_to_have_bytes_;
|
| -
|
| size_t bytes_releasable_;
|
| size_t resources_releasable_;
|
| size_t max_raster_usage_bytes_;
|
|
|