summaryrefslogtreecommitdiffstats
path: root/cc/layers/tiled_layer_impl_unittest.cc
diff options
context:
space:
mode:
authorprashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-28 06:37:17 +0000
committerprashant.n@samsung.com <prashant.n@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-28 06:37:17 +0000
commitc93cbb62f684183e0e5689a9fa35619daac10f7b (patch)
tree8002e049a31ad5cad79f63d19fe1f79b68b8ae2f /cc/layers/tiled_layer_impl_unittest.cc
parent22a9610ffaed4d7690463d2f6f710d46c206c70f (diff)
downloadchromium_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/layers/tiled_layer_impl_unittest.cc')
-rw-r--r--cc/layers/tiled_layer_impl_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc
index 377b04d..948ab37 100644
--- a/cc/layers/tiled_layer_impl_unittest.cc
+++ b/cc/layers/tiled_layer_impl_unittest.cc
@@ -23,8 +23,8 @@ class TiledLayerImplTest : public testing::Test {
TiledLayerImplTest() : host_impl_(&proxy_) {}
scoped_ptr<TiledLayerImpl> CreateLayerNoTiles(
- gfx::Size tile_size,
- gfx::Size layer_size,
+ const gfx::Size& tile_size,
+ const gfx::Size& layer_size,
LayerTilingData::BorderTexelOption border_texels) {
scoped_ptr<TiledLayerImpl> layer =
TiledLayerImpl::Create(host_impl_.active_tree(), 1);
@@ -46,8 +46,8 @@ class TiledLayerImplTest : public testing::Test {
// Create a default tiled layer with textures for all tiles and a default
// visibility of the entire layer size.
scoped_ptr<TiledLayerImpl> CreateLayer(
- gfx::Size tile_size,
- gfx::Size layer_size,
+ const gfx::Size& tile_size,
+ const gfx::Size& layer_size,
LayerTilingData::BorderTexelOption border_texels) {
scoped_ptr<TiledLayerImpl> layer =
CreateLayerNoTiles(tile_size, layer_size, border_texels);
@@ -69,8 +69,8 @@ class TiledLayerImplTest : public testing::Test {
void GetQuads(QuadList* quads,
SharedQuadStateList* shared_states,
- gfx::Size tile_size,
- gfx::Size layer_size,
+ const gfx::Size& tile_size,
+ const gfx::Size& layer_size,
LayerTilingData::BorderTexelOption border_texel_option,
const gfx::Rect& visible_content_rect) {
scoped_ptr<TiledLayerImpl> layer =