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 CC_ANIMATION_ANIMATION_CURVE_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_ |
6 #define CC_ANIMATION_ANIMATION_CURVE_H_ | 6 #define CC_ANIMATION_ANIMATION_CURVE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
12 #include "cc/output/filter_operations.h" | 12 #include "cc/output/filter_operations.h" |
13 #include "ui/gfx/transform.h" | 13 #include "ui/gfx/transform.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class BoxF; | 16 class BoxF; |
17 } | 17 } |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class ColorAnimationCurve; | 21 class ColorAnimationCurve; |
22 class FilterAnimationCurve; | 22 class FilterAnimationCurve; |
23 class FloatAnimationCurve; | 23 class FloatAnimationCurve; |
24 class ScrollOffsetAnimationCurve; | 24 class ScrollOffsetAnimationCurve; |
25 class TransformAnimationCurve; | 25 class TransformAnimationCurve; |
26 class TransformOperations; | |
27 | 26 |
28 // An animation curve is a function that returns a value given a time. | 27 // An animation curve is a function that returns a value given a time. |
29 class CC_EXPORT AnimationCurve { | 28 class CC_EXPORT AnimationCurve { |
30 public: | 29 public: |
31 enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET }; | 30 enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET }; |
32 | 31 |
33 virtual ~AnimationCurve() {} | 32 virtual ~AnimationCurve() {} |
34 | 33 |
35 virtual base::TimeDelta Duration() const = 0; | 34 virtual base::TimeDelta Duration() const = 0; |
36 virtual CurveType Type() const = 0; | 35 virtual CurveType Type() const = 0; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; | 105 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; |
107 virtual bool HasFilterThatMovesPixels() const = 0; | 106 virtual bool HasFilterThatMovesPixels() const = 0; |
108 | 107 |
109 // Partial Animation implementation. | 108 // Partial Animation implementation. |
110 CurveType Type() const override; | 109 CurveType Type() const override; |
111 }; | 110 }; |
112 | 111 |
113 } // namespace cc | 112 } // namespace cc |
114 | 113 |
115 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ | 114 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ |
OLD | NEW |