From 243e4f1996a61098947b5f9ad1798d6b5412ef0b Mon Sep 17 00:00:00 2001 From: "ajay.berwal@samsung.com" Date: Wed, 5 Feb 2014 09:18:42 +0000 Subject: 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 --- cc/test/tiled_layer_test_common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cc/test/tiled_layer_test_common.cc') diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc index e39765e..a0dbfc7 100644 --- a/cc/test/tiled_layer_test_common.cc +++ b/cc/test/tiled_layer_test_common.cc @@ -17,7 +17,7 @@ FakeLayerUpdater::Resource::~Resource() {} void FakeLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, const gfx::Rect& source_rect, - gfx::Vector2d dest_offset, + const gfx::Vector2d& dest_offset, bool partial_update) { const gfx::Rect kRect(0, 0, 10, 10); ResourceUpdate upload = ResourceUpdate::Create( -- cgit v1.1