From 64348eae94a2d07e923aaa0262b6c47947ffa3b3 Mon Sep 17 00:00:00 2001 From: "prashant.n@samsung.com" Date: Wed, 29 Jan 2014 22:58:26 +0000 Subject: [#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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247426 Review URL: https://codereview.chromium.org/145313006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247769 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/fake_picture_pile_impl.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cc/test/fake_picture_pile_impl.cc') diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc index bc751ed..9b168e6 100644 --- a/cc/test/fake_picture_pile_impl.cc +++ b/cc/test/fake_picture_pile_impl.cc @@ -17,8 +17,8 @@ FakePicturePileImpl::FakePicturePileImpl() {} FakePicturePileImpl::~FakePicturePileImpl() {} scoped_refptr FakePicturePileImpl::CreateFilledPile( - gfx::Size tile_size, - gfx::Size layer_bounds) { + const gfx::Size& tile_size, + const gfx::Size& layer_bounds) { scoped_refptr pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); pile->tiling().SetMaxTextureSize(tile_size); @@ -32,8 +32,8 @@ scoped_refptr FakePicturePileImpl::CreateFilledPile( } scoped_refptr FakePicturePileImpl::CreateEmptyPile( - gfx::Size tile_size, - gfx::Size layer_bounds) { + const gfx::Size& tile_size, + const gfx::Size& layer_bounds) { scoped_refptr pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); pile->tiling().SetMaxTextureSize(tile_size); @@ -44,8 +44,8 @@ scoped_refptr FakePicturePileImpl::CreateEmptyPile( scoped_refptr FakePicturePileImpl::CreatePileWithRecordedRegion( - gfx::Size tile_size, - gfx::Size layer_bounds, + const gfx::Size& tile_size, + const gfx::Size& layer_bounds, const Region& recorded_region) { scoped_refptr pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); -- cgit v1.1