summaryrefslogtreecommitdiffstats
path: root/cc/layers/ui_resource_layer_impl.cc
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/layers/ui_resource_layer_impl.cc
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/layers/ui_resource_layer_impl.cc')
-rw-r--r--cc/layers/ui_resource_layer_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/layers/ui_resource_layer_impl.cc b/cc/layers/ui_resource_layer_impl.cc
index 2c9a286..8a45eaa 100644
--- a/cc/layers/ui_resource_layer_impl.cc
+++ b/cc/layers/ui_resource_layer_impl.cc
@@ -62,8 +62,8 @@ void UIResourceLayerImpl::SetImageBounds(gfx::Size image_bounds) {
NoteLayerPropertyChanged();
}
-void UIResourceLayerImpl::SetUV(gfx::PointF top_left,
- gfx::PointF bottom_right) {
+void UIResourceLayerImpl::SetUV(const gfx::PointF& top_left,
+ const gfx::PointF& bottom_right) {
if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right)
return;
uv_top_left_ = top_left;