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

Side by Side Diff: cc/keyframed_animation_curve.h

Issue 11745018: Not for review: Move the implementation of WebTransformOperations into chromium (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: New approach Created 7 years, 11 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
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_KEYFRAMED_ANIMATION_CURVE_H_ 5 #ifndef CC_KEYFRAMED_ANIMATION_CURVE_H_
6 #define CC_KEYFRAMED_ANIMATION_CURVE_H_ 6 #define CC_KEYFRAMED_ANIMATION_CURVE_H_
7 7
8 #include "cc/animation_curve.h" 8 #include "cc/animation_curve.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/scoped_ptr_vector.h" 10 #include "cc/scoped_ptr_vector.h"
11 #include "cc/timing_function.h" 11 #include "cc/timing_function.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati ons.h" 12 #include "cc/transform_operations.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class CC_EXPORT Keyframe { 16 class CC_EXPORT Keyframe {
17 public: 17 public:
18 double time() const; 18 double time() const;
19 const TimingFunction* timingFunction() const; 19 const TimingFunction* timingFunction() const;
20 20
21 protected: 21 protected:
22 Keyframe(double time, scoped_ptr<TimingFunction>); 22 Keyframe(double time, scoped_ptr<TimingFunction>);
(...skipping 16 matching lines...) Expand all
39 scoped_ptr<FloatKeyframe> clone() const; 39 scoped_ptr<FloatKeyframe> clone() const;
40 40
41 private: 41 private:
42 FloatKeyframe(double time, float value, scoped_ptr<TimingFunction>); 42 FloatKeyframe(double time, float value, scoped_ptr<TimingFunction>);
43 43
44 float m_value; 44 float m_value;
45 }; 45 };
46 46
47 class CC_EXPORT TransformKeyframe : public Keyframe { 47 class CC_EXPORT TransformKeyframe : public Keyframe {
48 public: 48 public:
49 static scoped_ptr<TransformKeyframe> create(double time, const WebKit::WebTr ansformOperations& value, scoped_ptr<TimingFunction>); 49 static scoped_ptr<TransformKeyframe> create(double time, const TransformOper ations& value, scoped_ptr<TimingFunction>);
50 virtual ~TransformKeyframe(); 50 virtual ~TransformKeyframe();
51 51
52 const WebKit::WebTransformOperations& value() const; 52 const TransformOperations& value() const;
53 53
54 scoped_ptr<TransformKeyframe> clone() const; 54 scoped_ptr<TransformKeyframe> clone() const;
55 55
56 private: 56 private:
57 TransformKeyframe(double time, const WebKit::WebTransformOperations& value, scoped_ptr<TimingFunction>); 57 TransformKeyframe(double time, const TransformOperations& value, scoped_ptr< TimingFunction>);
58 58
59 WebKit::WebTransformOperations m_value; 59 TransformOperations m_value;
60 }; 60 };
61 61
62 class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve { 62 class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve {
63 public: 63 public:
64 // It is required that the keyframes be sorted by time. 64 // It is required that the keyframes be sorted by time.
65 static scoped_ptr<KeyframedFloatAnimationCurve> create(); 65 static scoped_ptr<KeyframedFloatAnimationCurve> create();
66 66
67 virtual ~KeyframedFloatAnimationCurve(); 67 virtual ~KeyframedFloatAnimationCurve();
68 68
69 void addKeyframe(scoped_ptr<FloatKeyframe>); 69 void addKeyframe(scoped_ptr<FloatKeyframe>);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Always sorted in order of increasing time. No two keyframes have the 107 // Always sorted in order of increasing time. No two keyframes have the
108 // same time. 108 // same time.
109 ScopedPtrVector<TransformKeyframe> m_keyframes; 109 ScopedPtrVector<TransformKeyframe> m_keyframes;
110 110
111 DISALLOW_COPY_AND_ASSIGN(KeyframedTransformAnimationCurve); 111 DISALLOW_COPY_AND_ASSIGN(KeyframedTransformAnimationCurve);
112 }; 112 };
113 113
114 } // namespace cc 114 } // namespace cc
115 115
116 #endif // CC_KEYFRAMED_ANIMATION_CURVE_H_ 116 #endif // CC_KEYFRAMED_ANIMATION_CURVE_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/keyframed_animation_curve.cc » ('j') | cc/transform_operations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698