diff options
author | ajay.berwal@samsung.com <ajay.berwal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 10:39:12 +0000 |
---|---|---|
committer | ajay.berwal@samsung.com <ajay.berwal@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 10:39:12 +0000 |
commit | 3244c913f7fc31c43107ffd895c786f26b892c07 (patch) | |
tree | 15f33a1820994df0998f7be8b89740f82dbde1ed /cc/test/animation_test_common.h | |
parent | 8aaf0f58eb8b532a4190a55c753f4796d7515933 (diff) | |
download | chromium_src-3244c913f7fc31c43107ffd895c786f26b892c07.zip chromium_src-3244c913f7fc31c43107ffd895c786f26b892c07.tar.gz chromium_src-3244c913f7fc31c43107ffd895c786f26b892c07.tar.bz2 |
Pass gfx structs by const ref (gfx::Vector2dF)
Avoid unneccessary copy of structures gfx::Vector2dF
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::Vector2dF)
BUG=159273
Review URL: https://codereview.chromium.org/130443005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/animation_test_common.h')
-rw-r--r-- | cc/test/animation_test_common.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h index 1205bf3..e23be0b 100644 --- a/cc/test/animation_test_common.h +++ b/cc/test/animation_test_common.h @@ -75,7 +75,8 @@ class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver { virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE; virtual void OnOpacityAnimated(float opacity) OVERRIDE; virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE; - virtual void OnScrollOffsetAnimated(gfx::Vector2dF scroll_offset) OVERRIDE; + virtual void OnScrollOffsetAnimated( + const gfx::Vector2dF& scroll_offset) OVERRIDE; virtual void OnAnimationWaitingForDeletion() OVERRIDE; virtual bool IsActive() const OVERRIDE; @@ -106,7 +107,7 @@ class FakeLayerAnimationValueProvider : public LayerAnimationValueProvider { public: virtual gfx::Vector2dF ScrollOffsetForAnimation() const OVERRIDE; - void set_scroll_offset(gfx::Vector2dF scroll_offset) { + void set_scroll_offset(const gfx::Vector2dF& scroll_offset) { scroll_offset_ = scroll_offset; } |