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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.h
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index 0c194be61c68b50abcd1179c86ec9397b9c3e9dc..f4c5e7c405af9d60d0fa7b6628c5ff15a382a933 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -31,7 +31,7 @@ class CC_EXPORT PictureLayerTilingClient {
const gfx::Rect& content_rect) = 0;
virtual void UpdatePile(Tile* tile) = 0;
virtual gfx::Size CalculateTileSize(
- gfx::Size content_bounds) const = 0;
+ const gfx::Size& content_bounds) const = 0;
virtual const Region* GetInvalidation() = 0;
virtual const PictureLayerTiling* GetTwinTiling(
const PictureLayerTiling* tiling) const = 0;
@@ -47,10 +47,10 @@ class CC_EXPORT PictureLayerTiling {
// Create a tiling with no tiles. CreateTiles must be called to add some.
static scoped_ptr<PictureLayerTiling> Create(
float contents_scale,
- gfx::Size layer_bounds,
+ const gfx::Size& layer_bounds,
PictureLayerTilingClient* client);
gfx::Size layer_bounds() const { return layer_bounds_; }
- void SetLayerBounds(gfx::Size layer_bounds);
+ void SetLayerBounds(const gfx::Size& layer_bounds);
void Invalidate(const Region& layer_region);
void CreateMissingTilesInLiveTilesRect();
@@ -135,11 +135,11 @@ class CC_EXPORT PictureLayerTiling {
void UpdateTilePriorities(
WhichTree tree,
- gfx::Size device_viewport,
+ const gfx::Size& device_viewport,
const gfx::Rect& viewport_in_layer_space,
const gfx::Rect& visible_layer_rect,
- gfx::Size last_layer_bounds,
- gfx::Size current_layer_bounds,
+ const gfx::Size& last_layer_bounds,
+ const gfx::Size& current_layer_bounds,
float last_layer_contents_scale,
float current_layer_contents_scale,
const gfx::Transform& last_screen_transform,
@@ -193,7 +193,7 @@ class CC_EXPORT PictureLayerTiling {
typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
PictureLayerTiling(float contents_scale,
- gfx::Size layer_bounds,
+ const gfx::Size& layer_bounds,
PictureLayerTilingClient* client);
void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
void CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698