| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 WebCompositorAnimationCurve_h | 5 #ifndef CompositorAnimationCurve_h |
| 6 #define WebCompositorAnimationCurve_h | 6 #define CompositorAnimationCurve_h |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "platform/PlatformExport.h" |
| 10 |
| 11 namespace cc { |
| 12 class TimingFunction; |
| 13 } |
| 7 | 14 |
| 8 namespace blink { | 15 namespace blink { |
| 9 | 16 |
| 10 class WebCompositorAnimationCurve { | 17 class PLATFORM_EXPORT CompositorAnimationCurve { |
| 11 public: | 18 public: |
| 12 virtual ~WebCompositorAnimationCurve() { } | |
| 13 | |
| 14 enum TimingFunctionType { | 19 enum TimingFunctionType { |
| 15 TimingFunctionTypeEase, | 20 TimingFunctionTypeEase, |
| 16 TimingFunctionTypeEaseIn, | 21 TimingFunctionTypeEaseIn, |
| 17 TimingFunctionTypeEaseOut, | 22 TimingFunctionTypeEaseOut, |
| 18 TimingFunctionTypeEaseInOut, | 23 TimingFunctionTypeEaseInOut, |
| 19 TimingFunctionTypeLinear | 24 TimingFunctionTypeLinear |
| 20 }; | 25 }; |
| 21 | 26 |
| 22 enum AnimationCurveType { | 27 enum AnimationCurveType { |
| 23 AnimationCurveTypeFilter, | 28 AnimationCurveTypeFilter, |
| 24 AnimationCurveTypeFloat, | 29 AnimationCurveTypeFloat, |
| 25 AnimationCurveTypeScrollOffset, | 30 AnimationCurveTypeScrollOffset, |
| 26 AnimationCurveTypeTransform, | 31 AnimationCurveTypeTransform, |
| 27 }; | 32 }; |
| 28 | 33 |
| 34 virtual ~CompositorAnimationCurve() {} |
| 35 |
| 29 virtual AnimationCurveType type() const = 0; | 36 virtual AnimationCurveType type() const = 0; |
| 37 |
| 38 protected: |
| 39 static scoped_ptr<cc::TimingFunction> createTimingFunction(TimingFunctionTyp
e); |
| 30 }; | 40 }; |
| 31 | 41 |
| 32 } // namespace blink | 42 } // namespace blink |
| 33 | 43 |
| 34 #endif // WebCompositorAnimationCurve_h | 44 #endif // CompositorAnimationCurve_h |
| OLD | NEW |