OLD | NEW |
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 CCAnimationTestCommon_h | 5 #ifndef CCAnimationTestCommon_h |
6 #define CCAnimationTestCommon_h | 6 #define CCAnimationTestCommon_h |
7 | 7 |
8 #include "CCActiveAnimation.h" | 8 #include "CCActiveAnimation.h" |
9 #include "CCAnimationCurve.h" | 9 #include "CCAnimationCurve.h" |
10 #include "CCLayerAnimationController.h" | 10 #include "CCLayerAnimationController.h" |
11 #include "IntSize.h" | 11 #include "IntSize.h" |
12 | 12 |
| 13 #include <wtf/OwnPtr.h> |
| 14 |
13 namespace cc { | 15 namespace cc { |
14 class CCLayerImpl; | 16 class CCLayerImpl; |
15 class LayerChromium; | 17 class LayerChromium; |
16 } | 18 } |
17 | 19 |
18 namespace WebKitTests { | 20 namespace WebKitTests { |
19 | 21 |
20 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve { | 22 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve { |
21 public: | 23 public: |
22 FakeFloatAnimationCurve(); | 24 FakeFloatAnimationCurve(); |
23 explicit FakeFloatAnimationCurve(double duration); | 25 explicit FakeFloatAnimationCurve(double duration); |
24 virtual ~FakeFloatAnimationCurve(); | 26 virtual ~FakeFloatAnimationCurve(); |
25 | 27 |
26 virtual double duration() const OVERRIDE; | 28 virtual double duration() const OVERRIDE; |
27 virtual float getValue(double now) const OVERRIDE; | 29 virtual float getValue(double now) const OVERRIDE; |
28 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE; | 30 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; |
29 | 31 |
30 private: | 32 private: |
31 double m_duration; | 33 double m_duration; |
32 }; | 34 }; |
33 | 35 |
34 class FakeTransformTransition : public cc::CCTransformAnimationCurve { | 36 class FakeTransformTransition : public cc::CCTransformAnimationCurve { |
35 public: | 37 public: |
36 FakeTransformTransition(double duration); | 38 FakeTransformTransition(double duration); |
37 virtual ~FakeTransformTransition(); | 39 virtual ~FakeTransformTransition(); |
38 | 40 |
39 virtual double duration() const OVERRIDE; | 41 virtual double duration() const OVERRIDE; |
40 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE
; | 42 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE
; |
41 | 43 |
42 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE; | 44 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; |
43 | 45 |
44 private: | 46 private: |
45 double m_duration; | 47 double m_duration; |
46 }; | 48 }; |
47 | 49 |
48 class FakeFloatTransition : public cc::CCFloatAnimationCurve { | 50 class FakeFloatTransition : public cc::CCFloatAnimationCurve { |
49 public: | 51 public: |
50 FakeFloatTransition(double duration, float from, float to); | 52 FakeFloatTransition(double duration, float from, float to); |
51 virtual ~FakeFloatTransition(); | 53 virtual ~FakeFloatTransition(); |
52 | 54 |
53 virtual double duration() const OVERRIDE; | 55 virtual double duration() const OVERRIDE; |
54 virtual float getValue(double time) const OVERRIDE; | 56 virtual float getValue(double time) const OVERRIDE; |
55 | 57 |
56 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE; | 58 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; |
57 | 59 |
58 private: | 60 private: |
59 double m_duration; | 61 double m_duration; |
60 float m_from; | 62 float m_from; |
61 float m_to; | 63 float m_to; |
62 }; | 64 }; |
63 | 65 |
64 class FakeLayerAnimationControllerClient : public cc::CCLayerAnimationController
Client { | 66 class FakeLayerAnimationControllerClient : public cc::CCLayerAnimationController
Client { |
65 public: | 67 public: |
66 FakeLayerAnimationControllerClient(); | 68 FakeLayerAnimationControllerClient(); |
(...skipping 16 matching lines...) Expand all Loading... |
83 | 85 |
84 void addOpacityTransitionToLayer(cc::LayerChromium&, double duration, float star
tOpacity, float endOpacity, bool useTimingFunction); | 86 void addOpacityTransitionToLayer(cc::LayerChromium&, double duration, float star
tOpacity, float endOpacity, bool useTimingFunction); |
85 void addOpacityTransitionToLayer(cc::CCLayerImpl&, double duration, float startO
pacity, float endOpacity, bool useTimingFunction); | 87 void addOpacityTransitionToLayer(cc::CCLayerImpl&, double duration, float startO
pacity, float endOpacity, bool useTimingFunction); |
86 | 88 |
87 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX
, int deltaY); | 89 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX
, int deltaY); |
88 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX,
int deltaY); | 90 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX,
int deltaY); |
89 | 91 |
90 } // namespace WebKitTests | 92 } // namespace WebKitTests |
91 | 93 |
92 #endif // CCAnimationTesctCommon_h | 94 #endif // CCAnimationTesctCommon_h |
OLD | NEW |