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/quads/tile_draw_quad.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cc/quads/tile_draw_quad.cc') diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc index 60116cc..c17bb99 100644 --- a/cc/quads/tile_draw_quad.cc +++ b/cc/quads/tile_draw_quad.cc @@ -26,7 +26,7 @@ void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& opaque_rect, unsigned resource_id, const gfx::RectF& tex_coord_rect, - gfx::Size texture_size, + const gfx::Size& texture_size, bool swizzle_contents) { ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::TILED_CONTENT, rect, opaque_rect, tex_coord_rect, texture_size, @@ -41,7 +41,7 @@ void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state, bool needs_blending, unsigned resource_id, const gfx::RectF& tex_coord_rect, - gfx::Size texture_size, + const gfx::Size& texture_size, bool swizzle_contents) { ContentDrawQuadBase::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, opaque_rect, visible_rect, needs_blending, -- cgit v1.1