| 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> | 13 #include <wtf/OwnPtr.h> |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 class CCLayerImpl; | 16 class CCLayerImpl; |
| 17 class LayerChromium; | 17 class LayerChromium; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace WebKitTests { | 20 namespace WebKitTests { |
| 21 | 21 |
| 22 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve { | 22 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve { |
| 23 public: | 23 public: |
| 24 FakeFloatAnimationCurve(); | 24 FakeFloatAnimationCurve(); |
| 25 explicit FakeFloatAnimationCurve(double duration); |
| 25 virtual ~FakeFloatAnimationCurve(); | 26 virtual ~FakeFloatAnimationCurve(); |
| 26 | 27 |
| 27 virtual double duration() const OVERRIDE; | 28 virtual double duration() const OVERRIDE; |
| 28 virtual float getValue(double now) const OVERRIDE; | 29 virtual float getValue(double now) const OVERRIDE; |
| 29 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; | 30 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; |
| 31 |
| 32 private: |
| 33 double m_duration; |
| 30 }; | 34 }; |
| 31 | 35 |
| 32 class FakeTransformTransition : public cc::CCTransformAnimationCurve { | 36 class FakeTransformTransition : public cc::CCTransformAnimationCurve { |
| 33 public: | 37 public: |
| 34 FakeTransformTransition(double duration); | 38 FakeTransformTransition(double duration); |
| 35 virtual ~FakeTransformTransition(); | 39 virtual ~FakeTransformTransition(); |
| 36 | 40 |
| 37 virtual double duration() const OVERRIDE; | 41 virtual double duration() const OVERRIDE; |
| 38 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE
; | 42 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE
; |
| 39 | 43 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 85 |
| 82 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); |
| 83 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); |
| 84 | 88 |
| 85 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX
, int deltaY); | 89 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX
, int deltaY); |
| 86 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX,
int deltaY); | 90 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX,
int deltaY); |
| 87 | 91 |
| 88 } // namespace WebKitTests | 92 } // namespace WebKitTests |
| 89 | 93 |
| 90 #endif // CCAnimationTesctCommon_h | 94 #endif // CCAnimationTesctCommon_h |
| OLD | NEW |