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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! 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/picture.cc ('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 dae62723711ee741adfe368e43ecc700afe137d3..0c194be61c68b50abcd1179c86ec9397b9c3e9dc 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -28,7 +28,7 @@ class CC_EXPORT PictureLayerTilingClient {
// tiling) This might return null if the client cannot create such a tile.
virtual scoped_refptr<Tile> CreateTile(
PictureLayerTiling* tiling,
- gfx::Rect content_rect) = 0;
+ const gfx::Rect& content_rect) = 0;
virtual void UpdatePile(Tile* tile) = 0;
virtual gfx::Size CalculateTileSize(
gfx::Size content_bounds) const = 0;
@@ -89,7 +89,7 @@ class CC_EXPORT PictureLayerTiling {
CoverageIterator();
CoverageIterator(const PictureLayerTiling* tiling,
float dest_scale,
- gfx::Rect rect);
+ const gfx::Rect& rect);
~CoverageIterator();
// Visible rect (no borders), always in the space of content_rect,
@@ -129,15 +129,15 @@ class CC_EXPORT PictureLayerTiling {
friend class PictureLayerTiling;
};
- Region OpaqueRegionInContentRect(gfx::Rect content_rect) const;
+ Region OpaqueRegionInContentRect(const gfx::Rect& content_rect) const;
void Reset();
void UpdateTilePriorities(
WhichTree tree,
gfx::Size device_viewport,
- gfx::Rect viewport_in_layer_space,
- gfx::Rect visible_layer_rect,
+ const gfx::Rect& viewport_in_layer_space,
+ const gfx::Rect& visible_layer_rect,
gfx::Size last_layer_bounds,
gfx::Size current_layer_bounds,
float last_layer_contents_scale,
@@ -179,9 +179,9 @@ class CC_EXPORT PictureLayerTiling {
static
gfx::Rect ExpandRectEquallyToAreaBoundedBy(
- gfx::Rect starting_rect,
+ const gfx::Rect& starting_rect,
int64 target_area,
- gfx::Rect bounding_rect,
+ const gfx::Rect& bounding_rect,
RectExpansionCache* cache);
bool has_ever_been_updated() const {
@@ -195,7 +195,7 @@ class CC_EXPORT PictureLayerTiling {
PictureLayerTiling(float contents_scale,
gfx::Size layer_bounds,
PictureLayerTilingClient* client);
- void SetLiveTilesRect(gfx::Rect live_tiles_rect);
+ void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
void CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
// Given properties.
« no previous file with comments | « cc/resources/picture.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698