summaryrefslogtreecommitdiffstats
path: root/cc/resources/resource_update.cc
diff options
context:
space:
mode:
authorajay.berwal@samsung.com <ajay.berwal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 09:18:42 +0000
committerajay.berwal@samsung.com <ajay.berwal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 09:18:42 +0000
commit243e4f1996a61098947b5f9ad1798d6b5412ef0b (patch)
tree647808bf21f492a652d54e8e15c12177ca04e824 /cc/resources/resource_update.cc
parent1e7e41e75151197f026df35b9c01c4bc63bccef0 (diff)
downloadchromium_src-243e4f1996a61098947b5f9ad1798d6b5412ef0b.zip
chromium_src-243e4f1996a61098947b5f9ad1798d6b5412ef0b.tar.gz
chromium_src-243e4f1996a61098947b5f9ad1798d6b5412ef0b.tar.bz2
Pass gfx structs by const ref (gfx::Vector2d)
Avoid unneccessary copy of structures gfx::Vector2d 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 gfx structs by const ref (gfx::Vector2d) BUG=159273 Review URL: https://codereview.chromium.org/132163009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/resource_update.cc')
-rw-r--r--cc/resources/resource_update.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/resources/resource_update.cc b/cc/resources/resource_update.cc
index f24962a..2fe8fe5 100644
--- a/cc/resources/resource_update.cc
+++ b/cc/resources/resource_update.cc
@@ -12,7 +12,7 @@ ResourceUpdate ResourceUpdate::Create(PrioritizedResource* resource,
const SkBitmap* bitmap,
const gfx::Rect& content_rect,
const gfx::Rect& source_rect,
- gfx::Vector2d dest_offset) {
+ const gfx::Vector2d& dest_offset) {
CHECK(content_rect.Contains(source_rect));
ResourceUpdate update;
update.texture = resource;