| Index: cc/resources/picture_layer_tiling.h
|
| diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
|
| index 05db0b037d9dee43095aea4707fe8fe1a832f3cc..ecdb8ae84f278d8c397d31f127e0aaf65dd82287 100644
|
| --- a/cc/resources/picture_layer_tiling.h
|
| +++ b/cc/resources/picture_layer_tiling.h
|
| @@ -35,9 +35,8 @@ class CC_EXPORT PictureLayerTilingClient {
|
| public:
|
| // Create a tile at the given content_rect (in the contents scale of the
|
| // tiling) This might return null if the client cannot create such a tile.
|
| - virtual scoped_refptr<Tile> CreateTile(
|
| - PictureLayerTiling* tiling,
|
| - const gfx::Rect& content_rect) = 0;
|
| + virtual scoped_refptr<Tile> CreateTile(float contents_scale,
|
| + const gfx::Rect& content_rect) = 0;
|
| virtual gfx::Size CalculateTileSize(
|
| const gfx::Size& content_bounds) const = 0;
|
| // This invalidation region defines the area (if any, it can by null) that
|
| @@ -108,21 +107,18 @@ class CC_EXPORT PictureLayerTiling {
|
|
|
| ~PictureLayerTiling();
|
|
|
| - // Create a tiling with no tiles. CreateTiles must be called to add some.
|
| - // TODO(danakj): Pass the raster_source here instead of the size, store the
|
| - // raster source instead of layer bounds?
|
| + // Create a tiling with no tiles. CreateTile() must be called to add some.
|
| static scoped_ptr<PictureLayerTiling> Create(
|
| float contents_scale,
|
| - const gfx::Size& layer_bounds,
|
| + scoped_refptr<RasterSource> raster_source,
|
| PictureLayerTilingClient* client,
|
| size_t max_tiles_for_interest_area,
|
| float skewport_target_time_in_seconds,
|
| int skewport_extrapolation_limit_in_content_pixels);
|
|
|
| - gfx::Size layer_bounds() const { return layer_bounds_; }
|
| - void Resize(const gfx::Size& new_layer_bounds);
|
| + void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source);
|
| void Invalidate(const Region& layer_invalidation);
|
| - void SetRasterSource(scoped_refptr<RasterSource> raster_source);
|
| + void SetRasterSourceOnTiles();
|
| void CreateMissingTilesInLiveTilesRect();
|
|
|
| void CloneTilesAndPropertiesFrom(const PictureLayerTiling& twin_tiling);
|
| @@ -133,6 +129,7 @@ class CC_EXPORT PictureLayerTiling {
|
| can_require_tiles_for_activation_ = can_require_tiles;
|
| }
|
|
|
| + RasterSource* raster_source() const { return raster_source_.get(); }
|
| gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
|
| gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
|
| gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
|
| @@ -274,7 +271,7 @@ class CC_EXPORT PictureLayerTiling {
|
| typedef base::hash_map<TileMapKey, scoped_refptr<Tile>> TileMap;
|
|
|
| PictureLayerTiling(float contents_scale,
|
| - const gfx::Size& layer_bounds,
|
| + scoped_refptr<RasterSource> raster_source,
|
| PictureLayerTilingClient* client,
|
| size_t max_tiles_for_interest_area,
|
| float skewport_target_time_in_seconds,
|
| @@ -320,7 +317,7 @@ class CC_EXPORT PictureLayerTiling {
|
| // Given properties.
|
| const float contents_scale_;
|
| PictureLayerTilingClient* const client_;
|
| - gfx::Size layer_bounds_;
|
| + scoped_refptr<RasterSource> raster_source_;
|
| TileResolution resolution_;
|
|
|
| // Internal data.
|
|
|