Index: cc/resources/picture_layer_tiling.h |
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h |
index daa04851d9c22f8759e283d5fd0d9d048b3f22bb..c8b70be3c21a57e6aef6e0c9d266452b1dd35bed 100644 |
--- a/cc/resources/picture_layer_tiling.h |
+++ b/cc/resources/picture_layer_tiling.h |
@@ -121,18 +121,20 @@ 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? |
static scoped_ptr<PictureLayerTiling> Create( |
float contents_scale, |
const gfx::Size& layer_bounds, |
PictureLayerTilingClient* client); |
gfx::Size layer_bounds() const { return layer_bounds_; } |
- void UpdateTilesToCurrentRasterSource(RasterSource* raster_source, |
- const Region& layer_invalidation, |
- const gfx::Size& new_layer_bounds); |
+ void Resize(const gfx::Size& new_layer_bounds); |
+ void Invalidate(const Region& layer_invalidation); |
+ void SetRasterSource(scoped_refptr<RasterSource> raster_source); |
void CreateMissingTilesInLiveTilesRect(); |
- void RemoveTilesInRegion(const Region& layer_region); |
- void SetClient(PictureLayerTilingClient* client); |
+ void CloneTilesAndPropertiesFrom(const PictureLayerTiling& twin_tiling); |
+ |
void set_resolution(TileResolution resolution) { resolution_ = resolution; } |
TileResolution resolution() const { return resolution_; } |
void set_can_require_tiles_for_activation(bool can_require_tiles) { |
@@ -307,10 +309,13 @@ class CC_EXPORT PictureLayerTiling { |
const std::vector<Tile*>* GetEvictionTiles(TreePriority tree_priority, |
EvictionCategory category); |
- void Invalidate(const Region& layer_region); |
- |
- void DoInvalidate(const Region& layer_region, |
- bool recreate_invalidated_tiles); |
+ // Save the required data for computing tile priorities later. |
+ void UpdateTilePriorityRects(float content_to_screen_scale_, |
+ const gfx::Rect& visible_rect_in_content_space, |
+ const gfx::Rect& skewport, |
+ const gfx::Rect& soon_border_rect, |
+ const gfx::Rect& eventually_rect, |
+ const Occlusion& occlusion_in_layer_space); |
void UpdateTileAndTwinPriority(Tile* tile) const; |
void UpdateTilePriority(Tile* tile) const; |
@@ -330,23 +335,23 @@ class CC_EXPORT PictureLayerTiling { |
double last_impl_frame_time_in_seconds_; |
gfx::Rect last_viewport_in_layer_space_; |
gfx::Rect last_visible_rect_in_content_space_; |
- float content_to_screen_scale_; |
bool can_require_tiles_for_activation_; |
- // Iteration rects in content space |
+ // Iteration rects in content space. |
gfx::Rect current_visible_rect_; |
gfx::Rect current_skewport_rect_; |
gfx::Rect current_soon_border_rect_; |
gfx::Rect current_eventually_rect_; |
+ // Other properties used for tile iteration and prioritization. |
+ float current_content_to_screen_scale_; |
+ Occlusion current_occlusion_in_layer_space_; |
bool has_visible_rect_tiles_; |
bool has_skewport_rect_tiles_; |
bool has_soon_border_rect_tiles_; |
bool has_eventually_rect_tiles_; |
- Occlusion current_occlusion_in_layer_space_; |
- |
// TODO(reveman): Remove this in favour of an array of eviction_tiles_ when we |
// change all enums to have a consistent way of getting the count/last |
// element. |