| Index: cc/tiles/picture_layer_tiling.h
|
| diff --git a/cc/tiles/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h
|
| index c2be058ff143ecdcd5861627ae1cd1b9f8a18fe5..fcd06ace8cd20025ba207cfd4e22593ac392a40c 100644
|
| --- a/cc/tiles/picture_layer_tiling.h
|
| +++ b/cc/tiles/picture_layer_tiling.h
|
| @@ -80,22 +80,13 @@ class CC_EXPORT PictureLayerTiling {
|
| public:
|
| static const int kBorderTexels = 1;
|
|
|
| - PictureLayerTilingClient* client() const { return client_; }
|
| + PictureLayerTiling(WhichTree tree,
|
| + float contents_scale,
|
| + scoped_refptr<RasterSource> raster_source,
|
| + PictureLayerTilingClient* client);
|
| ~PictureLayerTiling();
|
|
|
| - static float CalculateSoonBorderDistance(
|
| - const gfx::Rect& visible_rect_in_content_space,
|
| - float content_to_screen_scale);
|
| -
|
| - // Create a tiling with no tiles. CreateTile() must be called to add some.
|
| - static std::unique_ptr<PictureLayerTiling> Create(
|
| - WhichTree tree,
|
| - float contents_scale,
|
| - scoped_refptr<RasterSource> raster_source,
|
| - PictureLayerTilingClient* client,
|
| - size_t tiling_interest_area_padding,
|
| - float skewport_target_time_in_seconds,
|
| - int skewport_extrapolation_limit_in_content_pixels);
|
| + PictureLayerTilingClient* client() const { return client_; }
|
|
|
| void SetRasterSourceAndResize(scoped_refptr<RasterSource> raster_source);
|
| void Invalidate(const Region& layer_invalidation);
|
| @@ -236,10 +227,13 @@ class CC_EXPORT PictureLayerTiling {
|
|
|
| void Reset();
|
|
|
| - bool ComputeTilePriorityRects(const gfx::Rect& viewport_in_layer_space,
|
| - float ideal_contents_scale,
|
| - double current_frame_time_in_seconds,
|
| - const Occlusion& occlusion_in_layer_space);
|
| + void ComputeTilePriorityRects(
|
| + const gfx::Rect& visible_rect_in_layer_space,
|
| + const gfx::Rect& skewport_in_layer_space,
|
| + const gfx::Rect& soon_border_rect_in_layer_space,
|
| + const gfx::Rect& eventually_rect_in_layer_space,
|
| + float ideal_contents_scale,
|
| + const Occlusion& occlusion_in_layer_space);
|
|
|
| void GetAllPrioritizedTilesForTracing(
|
| std::vector<PrioritizedTile>* prioritized_tiles) const;
|
| @@ -268,18 +262,6 @@ class CC_EXPORT PictureLayerTiling {
|
|
|
| using TileMap = std::unordered_map<TileMapKey, ScopedTilePtr, TileMapKeyHash>;
|
|
|
| - struct FrameVisibleRect {
|
| - gfx::Rect visible_rect_in_content_space;
|
| - double frame_time_in_seconds = 0.0;
|
| - };
|
| -
|
| - PictureLayerTiling(WhichTree tree,
|
| - float contents_scale,
|
| - scoped_refptr<RasterSource> raster_source,
|
| - PictureLayerTilingClient* client,
|
| - size_t tiling_interest_area_padding,
|
| - float skewport_target_time_in_seconds,
|
| - int skewport_extrapolation_limit_in_content_pixels);
|
| void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
|
| void VerifyLiveTilesRect(bool is_on_recycle_tree) const;
|
| Tile* CreateTile(const Tile::CreateInfo& info);
|
| @@ -288,14 +270,6 @@ class CC_EXPORT PictureLayerTiling {
|
| bool RemoveTileAt(int i, int j);
|
| bool TilingMatchesTileIndices(const PictureLayerTiling* twin) const;
|
|
|
| - // Computes a skewport. The calculation extrapolates the last visible
|
| - // rect and the current visible rect to expand the skewport to where it
|
| - // would be in |skewport_target_time| seconds. Note that the skewport
|
| - // is guaranteed to contain the current visible rect.
|
| - gfx::Rect ComputeSkewport(double current_frame_time_in_seconds,
|
| - const gfx::Rect& visible_rect_in_content_space)
|
| - const;
|
| -
|
| // Save the required data for computing tile priorities later.
|
| void SetTilePriorityRects(float content_to_screen_scale_,
|
| const gfx::Rect& visible_rect_in_content_space,
|
| @@ -304,24 +278,6 @@ class CC_EXPORT PictureLayerTiling {
|
| const gfx::Rect& eventually_rect,
|
| const Occlusion& occlusion_in_layer_space);
|
|
|
| - bool NeedsUpdateForFrameAtTimeAndViewport(
|
| - double frame_time_in_seconds,
|
| - const gfx::Rect& viewport_in_layer_space) {
|
| - return frame_time_in_seconds !=
|
| - visible_rect_history_[0].frame_time_in_seconds ||
|
| - viewport_in_layer_space != last_viewport_in_layer_space_;
|
| - }
|
| - void UpdateVisibleRectHistory(
|
| - double frame_time_in_seconds,
|
| - const gfx::Rect& visible_rect_in_content_space) {
|
| - visible_rect_history_[1] = visible_rect_history_[0];
|
| - visible_rect_history_[0].frame_time_in_seconds = frame_time_in_seconds;
|
| - visible_rect_history_[0].visible_rect_in_content_space =
|
| - visible_rect_in_content_space;
|
| - // If we don't have a second history item, set it to the most recent one.
|
| - if (visible_rect_history_[1].frame_time_in_seconds == 0.0)
|
| - visible_rect_history_[1] = visible_rect_history_[0];
|
| - }
|
| bool IsTileOccludedOnCurrentTree(const Tile* tile) const;
|
| Tile::CreateInfo CreateInfoForTile(int i, int j) const;
|
| bool ShouldCreateTileAt(const Tile::CreateInfo& info) const;
|
| @@ -361,15 +317,8 @@ class CC_EXPORT PictureLayerTiling {
|
| const gfx::Rect& current_eventually_rect() const {
|
| return current_eventually_rect_;
|
| }
|
| - bool has_ever_been_updated() const {
|
| - return visible_rect_history_[0].frame_time_in_seconds != 0.0;
|
| - }
|
| void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles);
|
|
|
| - const size_t tiling_interest_area_padding_;
|
| - const float skewport_target_time_in_seconds_;
|
| - const int skewport_extrapolation_limit_in_content_pixels_;
|
| -
|
| // Given properties.
|
| const float contents_scale_;
|
| PictureLayerTilingClient* const client_;
|
| @@ -383,10 +332,6 @@ class CC_EXPORT PictureLayerTiling {
|
| TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
|
| gfx::Rect live_tiles_rect_;
|
|
|
| - gfx::Rect last_viewport_in_layer_space_;
|
| - // State saved for computing velocities based upon finite differences.
|
| - FrameVisibleRect visible_rect_history_[2];
|
| -
|
| bool can_require_tiles_for_activation_;
|
|
|
| // Iteration rects in content space.
|
| @@ -403,7 +348,6 @@ class CC_EXPORT PictureLayerTiling {
|
| bool has_soon_border_rect_tiles_;
|
| bool has_eventually_rect_tiles_;
|
| bool all_tiles_done_;
|
| - bool invalidated_since_last_compute_priority_rects_;
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling);
|
|
|