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

Side by Side Diff: cc/CCKeyframedAnimationCurve.h

Issue 10940002: Add wrapper container for a vector of OwnPtr<T> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCDirectRenderer.cpp ('k') | cc/CCKeyframedAnimationCurve.cpp » ('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 CCKeyframedAnimationCurve_h 5 #ifndef CCKeyframedAnimationCurve_h
6 #define CCKeyframedAnimationCurve_h 6 #define CCKeyframedAnimationCurve_h
7 7
8 #include "CCAnimationCurve.h" 8 #include "CCAnimationCurve.h"
9 #include "CCTimingFunction.h" 9 #include "CCTimingFunction.h"
10 #include "cc/own_ptr_vector.h"
10 #include <public/WebTransformOperations.h> 11 #include <public/WebTransformOperations.h>
11 #include <wtf/OwnPtr.h> 12 #include <wtf/OwnPtr.h>
12 #include <wtf/PassOwnPtr.h> 13 #include <wtf/PassOwnPtr.h>
13 #include <wtf/Vector.h> 14 #include <wtf/Vector.h>
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class CCKeyframe { 18 class CCKeyframe {
18 public: 19 public:
19 double time() const; 20 double time() const;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual PassOwnPtr<CCAnimationCurve> clone() const OVERRIDE; 73 virtual PassOwnPtr<CCAnimationCurve> clone() const OVERRIDE;
73 74
74 // CCFloatAnimationCurve implementation 75 // CCFloatAnimationCurve implementation
75 virtual float getValue(double t) const OVERRIDE; 76 virtual float getValue(double t) const OVERRIDE;
76 77
77 private: 78 private:
78 CCKeyframedFloatAnimationCurve(); 79 CCKeyframedFloatAnimationCurve();
79 80
80 // Always sorted in order of increasing time. No two keyframes have the 81 // Always sorted in order of increasing time. No two keyframes have the
81 // same time. 82 // same time.
82 Vector<OwnPtr<CCFloatKeyframe> > m_keyframes; 83 OwnPtrVector<CCFloatKeyframe> m_keyframes;
83 }; 84 };
84 85
85 class CCKeyframedTransformAnimationCurve : public CCTransformAnimationCurve { 86 class CCKeyframedTransformAnimationCurve : public CCTransformAnimationCurve {
86 public: 87 public:
87 // It is required that the keyframes be sorted by time. 88 // It is required that the keyframes be sorted by time.
88 static PassOwnPtr<CCKeyframedTransformAnimationCurve> create(); 89 static PassOwnPtr<CCKeyframedTransformAnimationCurve> create();
89 90
90 virtual ~CCKeyframedTransformAnimationCurve(); 91 virtual ~CCKeyframedTransformAnimationCurve();
91 92
92 void addKeyframe(PassOwnPtr<CCTransformKeyframe>); 93 void addKeyframe(PassOwnPtr<CCTransformKeyframe>);
93 94
94 // CCAnimationCurve implementation 95 // CCAnimationCurve implementation
95 virtual double duration() const OVERRIDE; 96 virtual double duration() const OVERRIDE;
96 virtual PassOwnPtr<CCAnimationCurve> clone() const OVERRIDE; 97 virtual PassOwnPtr<CCAnimationCurve> clone() const OVERRIDE;
97 98
98 // CCTransformAnimationCurve implementation 99 // CCTransformAnimationCurve implementation
99 virtual WebKit::WebTransformationMatrix getValue(double t) const OVERRIDE; 100 virtual WebKit::WebTransformationMatrix getValue(double t) const OVERRIDE;
100 101
101 private: 102 private:
102 CCKeyframedTransformAnimationCurve(); 103 CCKeyframedTransformAnimationCurve();
103 104
104 // Always sorted in order of increasing time. No two keyframes have the 105 // Always sorted in order of increasing time. No two keyframes have the
105 // same time. 106 // same time.
106 Vector<OwnPtr<CCTransformKeyframe> > m_keyframes; 107 OwnPtrVector<CCTransformKeyframe> m_keyframes;
107 }; 108 };
108 109
109 } // namespace cc 110 } // namespace cc
110 111
111 #endif // CCKeyframedAnimationCurve_h 112 #endif // CCKeyframedAnimationCurve_h
OLDNEW
« no previous file with comments | « cc/CCDirectRenderer.cpp ('k') | cc/CCKeyframedAnimationCurve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698