Enabling tests which should be fixed by r173829.
[chromium-blink-merge.git] / cc / timing_function.h
blob4fd029dd22bd76c46d8745a4a2637c791abfd401
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_TIMING_FUNCTION_H_
6 #define CC_TIMING_FUNCTION_H_
8 #include "cc/animation_curve.h"
9 #include "cc/cc_export.h"
10 #include "third_party/skia/include/core/SkScalar.h"
12 namespace cc {
14 // See http://www.w3.org/TR/css3-transitions/.
15 class CC_EXPORT TimingFunction : public FloatAnimationCurve {
16 public:
17 virtual ~TimingFunction();
19 // Partial implementation of FloatAnimationCurve.
20 virtual double duration() const OVERRIDE;
22 protected:
23 TimingFunction();
26 class CC_EXPORT CubicBezierTimingFunction : public TimingFunction {
27 public:
28 static scoped_ptr<CubicBezierTimingFunction> create(double x1, double y1,
29 double x2, double y2);
30 virtual ~CubicBezierTimingFunction();
32 // Partial implementation of FloatAnimationCurve.
33 virtual float getValue(double time) const OVERRIDE;
34 virtual scoped_ptr<AnimationCurve> clone() const OVERRIDE;
36 protected:
37 CubicBezierTimingFunction(double x1, double y1, double x2, double y2);
39 SkScalar x1_;
40 SkScalar y1_;
41 SkScalar x2_;
42 SkScalar y2_;
45 class CC_EXPORT EaseTimingFunction {
46 public:
47 static scoped_ptr<TimingFunction> create();
50 class CC_EXPORT EaseInTimingFunction {
51 public:
52 static scoped_ptr<TimingFunction> create();
55 class CC_EXPORT EaseOutTimingFunction {
56 public:
57 static scoped_ptr<TimingFunction> create();
60 class CC_EXPORT EaseInOutTimingFunction {
61 public:
62 static scoped_ptr<TimingFunction> create();
65 } // namespace cc
67 #endif // CC_TIMING_FUNCTION_H_