| Index: cc/picture_layer_tiling.h
|
| diff --git a/cc/picture_layer_tiling.h b/cc/picture_layer_tiling.h
|
| index d1ccc8213afdae1988f8a51ce266077916c5c05e..5cfb72b0eadb98c0a8fa4eca045fa62fd3f1c2ac 100644
|
| --- a/cc/picture_layer_tiling.h
|
| +++ b/cc/picture_layer_tiling.h
|
| @@ -86,7 +86,22 @@ class CC_EXPORT PictureLayerTiling {
|
|
|
| void Reset() { return tiles_.clear(); }
|
|
|
| + void UpdateTilePriorities(const gfx::Size& view_port,
|
| + const gfx::Transform& last_transform,
|
| + const gfx::Transform& current_transform,
|
| + double time_delta);
|
| +
|
| protected:
|
| + // TODO(qinmin): modify ui/range/Range.h to support template so that we
|
| + // don't need to define this.
|
| + struct Range {
|
| + Range(double start, double end) : start_(start), end_(end) {}
|
| + Range Intersects(const Range& other);
|
| + bool IsEmpty();
|
| + double start_;
|
| + double end_;
|
| + };
|
| +
|
| typedef std::pair<int, int> TileMapKey;
|
| typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
|
|
|
| @@ -94,6 +109,20 @@ class CC_EXPORT PictureLayerTiling {
|
| Tile* TileAt(int, int) const;
|
| void CreateTile(int i, int j);
|
|
|
| + // Calculate the time for the |current_bounds| to intersect with the
|
| + // |target_bounds| given its previous location and time delta.
|
| + // This function should work for both scaling and scrolling case.
|
| + double TimeForBoundsToIntersect(gfx::Rect previous_bounds,
|
| + gfx::Rect current_bounds,
|
| + double time_delta,
|
| + gfx::Rect target_bounds);
|
| +
|
| + // Calculate a time range that |value| will be larger than |threshold|
|
| + // given the velocity of its change.
|
| + Range TimeRangeValueLargerThanThreshold(int value,
|
| + int threshold,
|
| + double velocity);
|
| +
|
| PictureLayerTilingClient* client_;
|
| float contents_scale_;
|
| gfx::Size layer_bounds_;
|
| @@ -101,6 +130,7 @@ class CC_EXPORT PictureLayerTiling {
|
| TilingData tiling_data_;
|
|
|
| friend class Iterator;
|
| + friend class PictureLayerTilingTest;
|
| };
|
|
|
| } // namespace cc
|
|
|