| Index: cc/animation/timing_function.cc
|
| diff --git a/cc/animation/timing_function.cc b/cc/animation/timing_function.cc
|
| index 71319e121d8c10ad3bf2f0c0a6b9dfd37c7bf165..97e0d4bc0b13aff704921a5c8cec943723291e76 100644
|
| --- a/cc/animation/timing_function.cc
|
| +++ b/cc/animation/timing_function.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/logging.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "cc/animation/timing_function.h"
|
|
|
| namespace cc {
|
| @@ -11,10 +12,6 @@ TimingFunction::TimingFunction() {}
|
|
|
| TimingFunction::~TimingFunction() {}
|
|
|
| -double TimingFunction::Duration() const {
|
| - return 1.0;
|
| -}
|
| -
|
| scoped_ptr<CubicBezierTimingFunction> CubicBezierTimingFunction::Create(
|
| double x1, double y1, double x2, double y2) {
|
| return make_scoped_ptr(new CubicBezierTimingFunction(x1, y1, x2, y2));
|
| @@ -32,9 +29,8 @@ float CubicBezierTimingFunction::GetValue(double x) const {
|
| return static_cast<float>(bezier_.Solve(x));
|
| }
|
|
|
| -scoped_ptr<AnimationCurve> CubicBezierTimingFunction::Clone() const {
|
| - return make_scoped_ptr(
|
| - new CubicBezierTimingFunction(*this)).PassAs<AnimationCurve>();
|
| +float CubicBezierTimingFunction::Velocity(double x) const {
|
| + return static_cast<float>(bezier_.Slope(x));
|
| }
|
|
|
| void CubicBezierTimingFunction::Range(float* min, float* max) const {
|
| @@ -45,8 +41,9 @@ void CubicBezierTimingFunction::Range(float* min, float* max) const {
|
| *max = static_cast<float>(max_d);
|
| }
|
|
|
| -float CubicBezierTimingFunction::Velocity(double x) const {
|
| - return static_cast<float>(bezier_.Slope(x));
|
| +scoped_ptr<TimingFunction> CubicBezierTimingFunction::Clone() const {
|
| + return make_scoped_ptr(new CubicBezierTimingFunction(*this))
|
| + .PassAs<TimingFunction>();
|
| }
|
|
|
| // These numbers come from
|
|
|