| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 // Returns true if this animation affects scale. | 79 // Returns true if this animation affects scale. |
| 80 virtual bool AffectsScale() const = 0; | 80 virtual bool AffectsScale() const = 0; |
| 81 | 81 |
| 82 // Returns true if this animation is a translation. | 82 // Returns true if this animation is a translation. |
| 83 virtual bool IsTranslation() const = 0; | 83 virtual bool IsTranslation() const = 0; |
| 84 | 84 |
| 85 // Returns true if this animation preserves axis alignment. | 85 // Returns true if this animation preserves axis alignment. |
| 86 virtual bool PreservesAxisAlignment() const = 0; | 86 virtual bool PreservesAxisAlignment() const = 0; |
| 87 | 87 |
| 88 // Animation start scale |
| 89 virtual bool AnimationStartScale(bool forward_direction, |
| 90 float* start_scale) const = 0; |
| 91 |
| 88 // Set |max_scale| to the maximum scale along any dimension at the end of | 92 // Set |max_scale| to the maximum scale along any dimension at the end of |
| 89 // intermediate animation target points (eg keyframe end points). When | 93 // intermediate animation target points (eg keyframe end points). When |
| 90 // |forward_direction| is true, the animation curve assumes it plays from | 94 // |forward_direction| is true, the animation curve assumes it plays from |
| 91 // the first keyframe to the last, otherwise it assumes the opposite. Returns | 95 // the first keyframe to the last, otherwise it assumes the opposite. Returns |
| 92 // false if the maximum scale cannot be computed. | 96 // false if the maximum scale cannot be computed. |
| 93 virtual bool MaximumTargetScale(bool forward_direction, | 97 virtual bool MaximumTargetScale(bool forward_direction, |
| 94 float* max_scale) const = 0; | 98 float* max_scale) const = 0; |
| 95 | 99 |
| 96 // Partial Animation implementation. | 100 // Partial Animation implementation. |
| 97 CurveType Type() const override; | 101 CurveType Type() const override; |
| 98 }; | 102 }; |
| 99 | 103 |
| 100 class CC_EXPORT FilterAnimationCurve : public AnimationCurve { | 104 class CC_EXPORT FilterAnimationCurve : public AnimationCurve { |
| 101 public: | 105 public: |
| 102 ~FilterAnimationCurve() override {} | 106 ~FilterAnimationCurve() override {} |
| 103 | 107 |
| 104 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; | 108 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; |
| 105 virtual bool HasFilterThatMovesPixels() const = 0; | 109 virtual bool HasFilterThatMovesPixels() const = 0; |
| 106 | 110 |
| 107 // Partial Animation implementation. | 111 // Partial Animation implementation. |
| 108 CurveType Type() const override; | 112 CurveType Type() const override; |
| 109 }; | 113 }; |
| 110 | 114 |
| 111 } // namespace cc | 115 } // namespace cc |
| 112 | 116 |
| 113 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ | 117 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ |
| OLD | NEW |