diff options
author | prashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 06:37:17 +0000 |
---|---|---|
committer | prashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 06:37:17 +0000 |
commit | c93cbb62f684183e0e5689a9fa35619daac10f7b (patch) | |
tree | 8002e049a31ad5cad79f63d19fe1f79b68b8ae2f /cc/test/tiled_layer_test_common.h | |
parent | 22a9610ffaed4d7690463d2f6f710d46c206c70f (diff) | |
download | chromium_src-c93cbb62f684183e0e5689a9fa35619daac10f7b.zip chromium_src-c93cbb62f684183e0e5689a9fa35619daac10f7b.tar.gz chromium_src-c93cbb62f684183e0e5689a9fa35619daac10f7b.tar.bz2 |
[#7] Pass gfx::Size by const ref.
Any struct of size > 4 bytes should be passed by const ref.
Passing by ref for these structs is faster than passing by value,
especially when invoking function has multiple parameters and some
other scenarios mentioned in the bug.
BUG=159273
Review URL: https://codereview.chromium.org/145313006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/tiled_layer_test_common.h')
-rw-r--r-- | cc/test/tiled_layer_test_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h index 17de629..1e1aace 100644 --- a/cc/test/tiled_layer_test_common.h +++ b/cc/test/tiled_layer_test_common.h @@ -46,7 +46,7 @@ class FakeLayerUpdater : public LayerUpdater { PrioritizedResourceManager* resource) OVERRIDE; virtual void PrepareToUpdate(const gfx::Rect& content_rect, - gfx::Size tile_size, + const gfx::Size& tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) OVERRIDE; @@ -139,7 +139,7 @@ class FakeTiledLayerWithScaledBounds : public FakeTiledLayer { explicit FakeTiledLayerWithScaledBounds( PrioritizedResourceManager* resource_manager); - void SetContentBounds(gfx::Size content_bounds); + void SetContentBounds(const gfx::Size& content_bounds); virtual void CalculateContentsScale(float ideal_contents_scale, float device_scale_factor, float page_scale_factor, |