Chromium Code Reviews| Index: cc/resources/picture_layer_tiling.h |
| diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h |
| index 743c064276ea35ae015d1831e914baac79bcebdf..a171be1052b42161a67470b17420880683e614b7 100644 |
| --- a/cc/resources/picture_layer_tiling.h |
| +++ b/cc/resources/picture_layer_tiling.h |
| @@ -34,6 +34,9 @@ class PictureLayerTilingClient { |
| virtual gfx::Size CalculateTileSize( |
| gfx::Size current_tile_size, |
| gfx::Size content_bounds) = 0; |
| + virtual const Region* GetInvalidation() = 0; |
| + virtual const PictureLayerTiling* GetTwinTiling( |
| + const PictureLayerTiling* tiling) = 0; |
| protected: |
| virtual ~PictureLayerTilingClient() {} |
| @@ -49,11 +52,9 @@ class CC_EXPORT PictureLayerTiling { |
| gfx::Size layer_bounds() const { return layer_bounds_; } |
| void SetLayerBounds(gfx::Size layer_bounds); |
| - void Invalidate(const Region& layer_invalidation); |
| // Add any tiles that intersect with |layer_rect|. If any tiles already |
| // exist, then this leaves them as-is. |
| - void CreateTilesFromLayerRect(gfx::Rect layer_rect); |
| void SetClient(PictureLayerTilingClient* client); |
| void set_resolution(TileResolution resolution) { resolution_ = resolution; } |
| @@ -71,11 +72,6 @@ class CC_EXPORT PictureLayerTiling { |
| return all_tiles; |
| } |
| - static gfx::Rect ExpandRectEquallyToAreaBoundedBy( |
| - gfx::Rect starting_rect, |
| - int64 target_area, |
| - gfx::Rect bounding_rect); |
| - |
| // Iterate over all tiles to fill content_rect. Even if tiles are invalid |
| // (i.e. no valid resource) this tiling should still iterate over them. |
| // The union of all geometry_rect calls for each element iterated over should |
| @@ -154,17 +150,25 @@ class CC_EXPORT PictureLayerTiling { |
| explicit PictureLayerTiling(float contents_scale); |
| Tile* TileAt(int, int) const; |
| - void CreateTilesFromContentRect(gfx::Rect layer_rect); |
| void CreateTile(int i, int j); |
| - PictureLayerTilingClient* client_; |
| + static gfx::Rect ExpandRectEquallyToAreaBoundedBy( |
| + gfx::Rect starting_rect, |
| + int64 target_area, |
| + gfx::Rect bounding_rect); |
| + |
| + // Given properties. |
| float contents_scale_; |
| gfx::Size layer_bounds_; |
| - gfx::Rect last_prioritized_rect_; |
| - // It is not legal to have a NULL tile in the tiles_ map. |
| - TileMap tiles_; |
| - TilingData tiling_data_; |
| TileResolution resolution_; |
| + PictureLayerTilingClient* client_; |
| + |
| + // Internal data. |
| + TilingData tiling_data_; |
| + TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. |
| + |
| + // State saved for computing velocities based upon finite differences. |
| + gfx::Rect interest_rect_; |
|
enne (OOO)
2013/03/29 20:50:58
Can you call this last_interest_rect_ to match the
whunt
2013/03/29 21:52:04
I *can*, it doesn't quite follow the same semantic
enne (OOO)
2013/03/29 22:34:20
By "a variety of places" you mean "can be cleared
|
| int last_source_frame_number_; |
| double last_impl_frame_time_; |
| @@ -172,6 +176,8 @@ class CC_EXPORT PictureLayerTiling { |
| private: |
| DISALLOW_ASSIGN(PictureLayerTiling); |
|
enne (OOO)
2013/03/29 20:50:58
style nit: DISALLOW_etc goes last in a class decla
whunt
2013/03/29 21:52:04
Ahh, okay, this is where it merged in, I'll move i
|
| + void ManageTiles(const gfx::Rect& old_interest_rect, |
| + const gfx::Rect& new_interest_rect); |
| }; |
| } // namespace cc |