Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4830)

Unified Diff: cc/tiles/picture_layer_tiling.h

Issue 1318733006: cc: Do the math for a tile's content rect in layer space once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/tiles/picture_layer_tiling.h
diff --git a/cc/tiles/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h
index a0693d22a438bfc4e3b48188994a0256e71b4d59..08380b1d78c8c22b1d0d3d9a6f6ba07fdb0166f0 100644
--- a/cc/tiles/picture_layer_tiling.h
+++ b/cc/tiles/picture_layer_tiling.h
@@ -36,8 +36,7 @@ class CC_EXPORT PictureLayerTilingClient {
public:
// Create a tile at the given content_rect (in the contents scale of the
// tiling) This might return null if the client cannot create such a tile.
- virtual ScopedTilePtr CreateTile(float contents_scale,
- const gfx::Rect& content_rect) = 0;
+ virtual ScopedTilePtr CreateTile(const Tile::CreateInfo& info) = 0;
virtual gfx::Size CalculateTileSize(
const gfx::Size& content_bounds) const = 0;
// This invalidation region defines the area (if any, it can by null) that
@@ -285,7 +284,7 @@ class CC_EXPORT PictureLayerTiling {
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(int i, int j);
+ Tile* CreateTile(const Tile::CreateInfo& info);
ScopedTilePtr TakeTileAt(int i, int j);
// Returns true if the Tile existed and was removed from the tiling.
bool RemoveTileAt(int i, int j);
@@ -326,7 +325,8 @@ class CC_EXPORT PictureLayerTiling {
visible_rect_history_[1] = visible_rect_history_[0];
}
bool IsTileOccludedOnCurrentTree(const Tile* tile) const;
- bool ShouldCreateTileAt(int i, int j) const;
+ Tile::CreateInfo CreateInfoForTile(int i, int j) const;
+ bool ShouldCreateTileAt(const Tile::CreateInfo& info) const;
bool IsTileOccluded(const Tile* tile) const;
void UpdateRequiredStatesOnTile(Tile* tile) const;
PrioritizedTile MakePrioritizedTile(

Powered by Google App Engine
This is Rietveld 408576698