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

Side by Side Diff: cc/timing_function.h

Issue 11359077: cc: Replace the WebCore::UnitBezier class with the SkUnitCubicInterp() method from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix web unittests Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/stubs/unit_bezier.h ('k') | cc/timing_function.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TIMING_FUNCTION_H_ 5 #ifndef CC_TIMING_FUNCTION_H_
6 #define CC_TIMING_FUNCTION_H_ 6 #define CC_TIMING_FUNCTION_H_
7 7
8 #include "UnitBezier.h"
9 #include "cc/animation_curve.h" 8 #include "cc/animation_curve.h"
10 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "third_party/skia/include/core/SkScalar.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 // See http://www.w3.org/TR/css3-transitions/. 14 // See http://www.w3.org/TR/css3-transitions/.
15 class CC_EXPORT TimingFunction : public FloatAnimationCurve { 15 class CC_EXPORT TimingFunction : public FloatAnimationCurve {
16 public: 16 public:
17 virtual ~TimingFunction(); 17 virtual ~TimingFunction();
18 18
19 // Partial implementation of FloatAnimationCurve. 19 // Partial implementation of FloatAnimationCurve.
20 virtual double duration() const OVERRIDE; 20 virtual double duration() const OVERRIDE;
21 21
22 protected: 22 protected:
23 TimingFunction(); 23 TimingFunction();
24 }; 24 };
25 25
26 class CC_EXPORT CubicBezierTimingFunction : public TimingFunction { 26 class CC_EXPORT CubicBezierTimingFunction : public TimingFunction {
27 public: 27 public:
28 static scoped_ptr<CubicBezierTimingFunction> create(double x1, double y1, do uble x2, double y2); 28 static scoped_ptr<CubicBezierTimingFunction> create(double x1, double y1, do uble x2, double y2);
29 virtual ~CubicBezierTimingFunction(); 29 virtual ~CubicBezierTimingFunction();
30 30
31 // Partial implementation of FloatAnimationCurve. 31 // Partial implementation of FloatAnimationCurve.
32 virtual float getValue(double time) const OVERRIDE; 32 virtual float getValue(double time) const OVERRIDE;
33 virtual scoped_ptr<AnimationCurve> clone() const OVERRIDE; 33 virtual scoped_ptr<AnimationCurve> clone() const OVERRIDE;
34 34
35 protected: 35 protected:
36 CubicBezierTimingFunction(double x1, double y1, double x2, double y2); 36 CubicBezierTimingFunction(double x1, double y1, double x2, double y2);
37 37
38 UnitBezier m_curve; 38 SkScalar m_x1;
39 SkScalar m_y1;
40 SkScalar m_x2;
41 SkScalar m_y2;
39 }; 42 };
40 43
41 class CC_EXPORT EaseTimingFunction { 44 class CC_EXPORT EaseTimingFunction {
42 public: 45 public:
43 static scoped_ptr<TimingFunction> create(); 46 static scoped_ptr<TimingFunction> create();
44 }; 47 };
45 48
46 class CC_EXPORT EaseInTimingFunction { 49 class CC_EXPORT EaseInTimingFunction {
47 public: 50 public:
48 static scoped_ptr<TimingFunction> create(); 51 static scoped_ptr<TimingFunction> create();
49 }; 52 };
50 53
51 class CC_EXPORT EaseOutTimingFunction { 54 class CC_EXPORT EaseOutTimingFunction {
52 public: 55 public:
53 static scoped_ptr<TimingFunction> create(); 56 static scoped_ptr<TimingFunction> create();
54 }; 57 };
55 58
56 class CC_EXPORT EaseInOutTimingFunction { 59 class CC_EXPORT EaseInOutTimingFunction {
57 public: 60 public:
58 static scoped_ptr<TimingFunction> create(); 61 static scoped_ptr<TimingFunction> create();
59 }; 62 };
60 63
61 } // namespace cc 64 } // namespace cc
62 65
63 #endif // CC_TIMING_FUNCTION_H_ 66 #endif // CC_TIMING_FUNCTION_H_
OLDNEW
« no previous file with comments | « cc/stubs/unit_bezier.h ('k') | cc/timing_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698