Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: cc/animation/scroll_offset_animation_curve.cc

Issue 130443005: [#5] Pass gfx structs by const ref (gfx::Vector2dF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated the review comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/scroll_offset_animation_curve.h ('k') | cc/base/math_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/scroll_offset_animation_curve.cc
diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc
index 362aa1ed5483b275648b7e5773e7a797f3066a4b..ecba43f5cc9678c6060e5878c2c532af20ca3d25 100644
--- a/cc/animation/scroll_offset_animation_curve.cc
+++ b/cc/animation/scroll_offset_animation_curve.cc
@@ -16,14 +16,14 @@ const double kDurationDivisor = 60.0;
namespace cc {
scoped_ptr<ScrollOffsetAnimationCurve> ScrollOffsetAnimationCurve::Create(
- gfx::Vector2dF target_value,
+ const gfx::Vector2dF& target_value,
scoped_ptr<TimingFunction> timing_function) {
return make_scoped_ptr(
new ScrollOffsetAnimationCurve(target_value, timing_function.Pass()));
}
ScrollOffsetAnimationCurve::ScrollOffsetAnimationCurve(
- gfx::Vector2dF target_value,
+ const gfx::Vector2dF& target_value,
scoped_ptr<TimingFunction> timing_function)
: target_value_(target_value),
duration_(0.0),
@@ -31,7 +31,8 @@ ScrollOffsetAnimationCurve::ScrollOffsetAnimationCurve(
ScrollOffsetAnimationCurve::~ScrollOffsetAnimationCurve() {}
-void ScrollOffsetAnimationCurve::SetInitialValue(gfx::Vector2dF initial_value) {
+void ScrollOffsetAnimationCurve::SetInitialValue(
+ const gfx::Vector2dF& initial_value) {
initial_value_ = initial_value;
// The duration of a scroll animation depends on the size of the scroll.
« no previous file with comments | « cc/animation/scroll_offset_animation_curve.h ('k') | cc/base/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698