summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_sorter.h
diff options
context:
space:
mode:
authorr.kasibhatla@samsung.com <r.kasibhatla@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 07:26:47 +0000
committerr.kasibhatla@samsung.com <r.kasibhatla@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 07:26:47 +0000
commit14bc5d68972f02676621c4d8087c428caff008c1 (patch)
tree8033616cbaceabbb6a921c7010c7ba5e63ced5e8 /cc/trees/layer_sorter.h
parent54facd633172b6d39c4f22edd9b976a39f468c45 (diff)
downloadchromium_src-14bc5d68972f02676621c4d8087c428caff008c1.zip
chromium_src-14bc5d68972f02676621c4d8087c428caff008c1.tar.gz
chromium_src-14bc5d68972f02676621c4d8087c428caff008c1.tar.bz2
[#4] Pass gfx structs by const ref (gfx::PointF)
Avoid unneccessary copy of structures gfx::PointF 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, piman Review URL: https://codereview.chromium.org/139233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_sorter.h')
-rw-r--r--cc/trees/layer_sorter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/trees/layer_sorter.h b/cc/trees/layer_sorter.h
index 361a5c8..c5aab7c 100644
--- a/cc/trees/layer_sorter.h
+++ b/cc/trees/layer_sorter.h
@@ -42,7 +42,7 @@ struct CC_EXPORT LayerShape {
LayerShape(float width, float height, const gfx::Transform& draw_transform);
~LayerShape();
- float LayerZFromProjectedPoint(gfx::PointF p) const;
+ float LayerZFromProjectedPoint(const gfx::PointF& p) const;
gfx::Vector3dF layer_normal;
gfx::Point3F transform_origin;