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

Side by Side Diff: cc/animation_curve.h

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/animation.cc ('k') | cc/animation_curve.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_ANIMATION_CURVE_H_ 5 #ifndef CC_ANIMATION_CURVE_H_
6 #define CC_ANIMATION_CURVE_H_ 6 #define CC_ANIMATION_CURVE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "ui/gfx/transform.h" 10 #include "ui/gfx/transform.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class FloatAnimationCurve; 14 class FloatAnimationCurve;
15 class TransformAnimationCurve; 15 class TransformAnimationCurve;
16 class TransformOperations; 16 class TransformOperations;
17 17
18 // An animation curve is a function that returns a value given a time. 18 // An animation curve is a function that returns a value given a time.
19 // There are currently only two types of curve, float and transform. 19 // There are currently only two types of curve, float and transform.
20 class CC_EXPORT AnimationCurve { 20 class CC_EXPORT AnimationCurve {
21 public: 21 public:
22 enum Type { Float, Transform }; 22 enum CurveType { Float, Transform };
23 23
24 virtual ~AnimationCurve() { } 24 virtual ~AnimationCurve() {}
25 25
26 virtual double duration() const = 0; 26 virtual double Duration() const = 0;
27 virtual Type type() const = 0; 27 virtual CurveType Type() const = 0;
28 virtual scoped_ptr<AnimationCurve> clone() const = 0; 28 virtual scoped_ptr<AnimationCurve> Clone() const = 0;
29 29
30 const FloatAnimationCurve* toFloatAnimationCurve() const; 30 const FloatAnimationCurve* ToFloatAnimationCurve() const;
31 const TransformAnimationCurve* toTransformAnimationCurve() const; 31 const TransformAnimationCurve* ToTransformAnimationCurve() const;
32 }; 32 };
33 33
34 class CC_EXPORT FloatAnimationCurve : public AnimationCurve { 34 class CC_EXPORT FloatAnimationCurve : public AnimationCurve {
35 public: 35 public:
36 virtual ~FloatAnimationCurve() { } 36 virtual ~FloatAnimationCurve() {}
37 37
38 virtual float getValue(double t) const = 0; 38 virtual float GetValue(double t) const = 0;
39 39
40 // Partial Animation implementation. 40 // Partial Animation implementation.
41 virtual Type type() const OVERRIDE; 41 virtual CurveType Type() const OVERRIDE;
42 }; 42 };
43 43
44 class CC_EXPORT TransformAnimationCurve : public AnimationCurve { 44 class CC_EXPORT TransformAnimationCurve : public AnimationCurve {
45 public: 45 public:
46 virtual ~TransformAnimationCurve() { } 46 virtual ~TransformAnimationCurve() {}
47 47
48 virtual gfx::Transform getValue(double t) const = 0; 48 virtual gfx::Transform GetValue(double t) const = 0;
49 49
50 // Partial Animation implementation. 50 // Partial Animation implementation.
51 virtual Type type() const OVERRIDE; 51 virtual CurveType Type() const OVERRIDE;
52 }; 52 };
53 53
54 } // namespace cc 54 } // namespace cc
55 55
56 #endif // CC_ANIMATION_CURVE_H_ 56 #endif // CC_ANIMATION_CURVE_H_
OLDNEW
« no previous file with comments | « cc/animation.cc ('k') | cc/animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698