| Index: cc/resources/picture_layer_tiling_set.h
|
| diff --git a/cc/resources/picture_layer_tiling_set.h b/cc/resources/picture_layer_tiling_set.h
|
| index f0d0fd7890702ec8a0b4b149fa5216d2068ea004..4038b32d9a12c859e60c17925a038f56e16f30f1 100644
|
| --- a/cc/resources/picture_layer_tiling_set.h
|
| +++ b/cc/resources/picture_layer_tiling_set.h
|
| @@ -38,31 +38,42 @@ class CC_EXPORT PictureLayerTilingSet {
|
| };
|
|
|
| static scoped_ptr<PictureLayerTilingSet> Create(
|
| - PictureLayerTilingClient* client);
|
| + PictureLayerTilingClient* client,
|
| + size_t max_tiles_for_interest_area,
|
| + float skewport_target_time_in_seconds,
|
| + int skewport_extrapolation_limit_in_content);
|
|
|
| ~PictureLayerTilingSet();
|
|
|
| - void SetClient(PictureLayerTilingClient* client);
|
| const PictureLayerTilingClient* client() const { return client_; }
|
|
|
| - void RemoveTilesInRegion(const Region& region);
|
| void CleanUpTilings(float min_acceptable_high_res_scale,
|
| float max_acceptable_high_res_scale,
|
| const std::vector<PictureLayerTiling*>& needed_tilings,
|
| bool should_have_low_res,
|
| PictureLayerTilingSet* twin_set,
|
| PictureLayerTilingSet* recycled_twin_set);
|
| -
|
| + void RemoveNonIdealTilings();
|
| // Make this set of tilings match the same set of content scales from |other|.
|
| // Delete any tilings that don't meet |minimum_contents_scale|. Recreate
|
| // any tiles that intersect |layer_invalidation|. Update the size of all
|
| // tilings to |new_layer_bounds|.
|
| // Returns true if we had at least one high res tiling synced.
|
| - bool SyncTilings(const PictureLayerTilingSet& other,
|
| - const gfx::Size& new_layer_bounds,
|
| - const Region& layer_invalidation,
|
| - float minimum_contents_scale,
|
| - RasterSource* raster_source);
|
| + // TODO(danakj): Remove this !!!
|
| + bool SyncTilingsForTesting(const PictureLayerTilingSet& other,
|
| + const gfx::Size& new_layer_bounds,
|
| + const Region& layer_invalidation,
|
| + float minimum_contents_scale,
|
| + RasterSource* raster_source);
|
| +
|
| + void UpdateTilingsToCurrentRasterSource(
|
| + RasterSource* raster_source,
|
| + const PictureLayerTilingSet* twin_set,
|
| + // TODO(danakj): Don't need to pass layer bounds here, we have the raster
|
| + // source already, and they are the same as the raster source size.
|
| + const gfx::Size& layer_bounds,
|
| + const Region& layer_invalidation,
|
| + float minimum_contents_scale);
|
|
|
| PictureLayerTiling* AddTiling(float contents_scale,
|
| const gfx::Size& layer_bounds);
|
| @@ -89,6 +100,9 @@ class CC_EXPORT PictureLayerTilingSet {
|
| // exist.
|
| float GetMaximumContentsScale() const;
|
|
|
| + // Removes all tilings with a contents scale < |minimum_scale|.
|
| + void RemoveTilingsBelowScale(float minimum_scale);
|
| +
|
| // Remove all tilings.
|
| void RemoveAllTilings();
|
|
|
| @@ -155,14 +169,22 @@ class CC_EXPORT PictureLayerTilingSet {
|
| TilingRange GetTilingRange(TilingRangeType type) const;
|
|
|
| private:
|
| - explicit PictureLayerTilingSet(PictureLayerTilingClient* client);
|
| + explicit PictureLayerTilingSet(
|
| + PictureLayerTilingClient* client,
|
| + size_t max_tiles_for_interest_area,
|
| + float skewport_target_time_in_seconds,
|
| + int skewport_extrapolation_limit_in_content_pixels);
|
|
|
| // Remove one tiling.
|
| void Remove(PictureLayerTiling* tiling);
|
|
|
| - PictureLayerTilingClient* client_;
|
| ScopedPtrVector<PictureLayerTiling> tilings_;
|
|
|
| + const size_t max_tiles_for_interest_area_;
|
| + const float skewport_target_time_in_seconds_;
|
| + const int skewport_extrapolation_limit_in_content_pixels_;
|
| + PictureLayerTilingClient* client_;
|
| +
|
| friend class Iterator;
|
| DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
|
| };
|
|
|