| Index: cc/picture_layer_tiling.h
|
| diff --git a/cc/picture_layer_tiling.h b/cc/picture_layer_tiling.h
|
| index e8e3b44222dbd82ecc4929b026cfd0fa2d5014aa..85e502555b9a75f704f4f3ce111a3164695a2a87 100644
|
| --- a/cc/picture_layer_tiling.h
|
| +++ b/cc/picture_layer_tiling.h
|
| @@ -36,13 +36,36 @@ class PictureLayerTilingClient {
|
|
|
| class TileHandle {
|
| public:
|
| - TileHandle(scoped_refptr<Tile> tile);
|
| - Tile* tile() const { return tile_.get(); }
|
| + TileHandle(std::pair<int, int> key, scoped_refptr<Tile> tile);
|
| + TileHandle(const TileHandle& tile_handle);
|
| + ~TileHandle();
|
| +
|
| void RegisterWithTileManager();
|
| void UnregisterFromTileManager();
|
| +
|
| + void AddToLiveTileList(PictureLayerTiling* tiling);
|
| + void RemoveFromLiveTileList();
|
| +
|
| + std::pair<int, int> key() const { return key_; }
|
| + Tile* tile() const { return tile_.get(); }
|
| + bool should_be_live() const { return should_be_live_; }
|
| + void set_should_be_live(bool should_be_live) {
|
| + should_be_live_ = should_be_live;
|
| + }
|
| +
|
| private:
|
| + std::pair<int, int> key_;
|
| scoped_refptr<Tile> tile_;
|
| scoped_refptr<ManagedTileState> managed_tile_state_;
|
| +
|
| + // Transiently set in UpdateTilePriorities to track tiles that
|
| + // are actively desired to be painted.
|
| + bool should_be_live_;
|
| +
|
| + // tiling_ is non-NULL only if this is in a tiling's live_tile_list_, in
|
| + // which case tiling_live_tile_list_iterator_ valid.
|
| + PictureLayerTiling* tiling_;
|
| + std::list<TileHandle*>::iterator tiling_live_tile_list_iterator_;
|
| };
|
|
|
| class CC_EXPORT PictureLayerTiling {
|
| @@ -167,6 +190,7 @@ class CC_EXPORT PictureLayerTiling {
|
| protected:
|
| typedef std::pair<int, int> TileMapKey;
|
| typedef base::hash_map<TileMapKey, TileHandle> TileMap;
|
| + typedef std::list<TileHandle*> TileList;
|
|
|
| PictureLayerTiling(float contents_scale);
|
| Tile* TileAt(int, int) const;
|
| @@ -179,11 +203,13 @@ class CC_EXPORT PictureLayerTiling {
|
| gfx::Rect last_prioritized_rect_;
|
| // It is not legal to have a NULL tile in the tiles_ map.
|
| TileMap tiles_;
|
| + TileList live_tiles_;
|
| TilingData tiling_data_;
|
| TileResolution resolution_;
|
| int last_source_frame_number_;
|
| double last_impl_frame_time_;
|
|
|
| + friend class TileHandle;
|
| friend class Iterator;
|
| };
|
|
|
|
|