summaryrefslogtreecommitdiffstats
path: root/cc/quads/yuv_video_draw_quad.h
diff options
context:
space:
mode:
authorr.kasibhatla@samsung.com <r.kasibhatla@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 19:59:20 +0000
committerr.kasibhatla@samsung.com <r.kasibhatla@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 19:59:20 +0000
commitcde9802690b510d22ca1532f837cea58b9a18961 (patch)
treeb87d461a09fa9a12e5f687bc44dd26fd548e31f8 /cc/quads/yuv_video_draw_quad.h
parent12e0dcf37c70f2a56d51eb81e4b7decef8da83d4 (diff)
downloadchromium_src-cde9802690b510d22ca1532f837cea58b9a18961.zip
chromium_src-cde9802690b510d22ca1532f837cea58b9a18961.tar.gz
chromium_src-cde9802690b510d22ca1532f837cea58b9a18961.tar.bz2
[#3] Pass gfx structs by const ref (gfx::SizeF)
Avoid unneccessary copy of structures gfx::SizeF by passing them by const ref rather than value. 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. Pass by value creates unneccessary overhead which should be avoided. BUG=159273 R=danakj, enne Review URL: https://codereview.chromium.org/139173004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quads/yuv_video_draw_quad.h')
-rw-r--r--cc/quads/yuv_video_draw_quad.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index 02d307f..175b41a 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -22,7 +22,7 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
void SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
const gfx::Rect& opaque_rect,
- gfx::SizeF tex_scale,
+ const gfx::SizeF& tex_scale,
unsigned y_plane_resource_id,
unsigned u_plane_resource_id,
unsigned v_plane_resource_id,
@@ -33,7 +33,7 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
const gfx::Rect& opaque_rect,
const gfx::Rect& visible_rect,
bool needs_blending,
- gfx::SizeF tex_scale,
+ const gfx::SizeF& tex_scale,
unsigned y_plane_resource_id,
unsigned u_plane_resource_id,
unsigned v_plane_resource_id,