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

Unified Diff: cc/animation/timing_function.h

Issue 606543002: CC: Stop TimingFunction inheriting from AnimationCurve. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test by using FakeFloatAnimationCurve, added import. Created 6 years, 3 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/keyframed_animation_curve.cc ('k') | cc/animation/timing_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/timing_function.h
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index cc979398e4b4b098ece44d57269c1e220605129b..a6d1aacecd49af03457ba99fa9cc8ec9ab0b7309 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -5,24 +5,21 @@
#ifndef CC_ANIMATION_TIMING_FUNCTION_H_
#define CC_ANIMATION_TIMING_FUNCTION_H_
-#include "cc/animation/animation_curve.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/cubic_bezier.h"
namespace cc {
// See http://www.w3.org/TR/css3-transitions/.
-class CC_EXPORT TimingFunction : public FloatAnimationCurve {
+class CC_EXPORT TimingFunction {
public:
virtual ~TimingFunction();
- // Partial implementation of FloatAnimationCurve.
- virtual double Duration() const OVERRIDE;
-
- // The smallest and largest values returned by GetValue for inputs in
- // [0, 1].
- virtual void Range(float* min, float* max) const = 0;
+ virtual float GetValue(double t) const = 0;
virtual float Velocity(double time) const = 0;
+ // The smallest and largest values returned by GetValue for inputs in [0, 1].
+ virtual void Range(float* min, float* max) const = 0;
+ virtual scoped_ptr<TimingFunction> Clone() const = 0;
protected:
TimingFunction();
@@ -37,12 +34,11 @@ class CC_EXPORT CubicBezierTimingFunction : public TimingFunction {
double x2, double y2);
virtual ~CubicBezierTimingFunction();
- // Partial implementation of FloatAnimationCurve.
+ // TimingFunction implementation.
virtual float GetValue(double time) const OVERRIDE;
- virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
-
- virtual void Range(float* min, float* max) const OVERRIDE;
virtual float Velocity(double time) const OVERRIDE;
+ virtual void Range(float* min, float* max) const OVERRIDE;
+ virtual scoped_ptr<TimingFunction> Clone() const OVERRIDE;
protected:
CubicBezierTimingFunction(double x1, double y1, double x2, double y2);
« no previous file with comments | « cc/animation/keyframed_animation_curve.cc ('k') | cc/animation/timing_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698