| 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 "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/output/filter_operations.h" | 10 #include "cc/output/filter_operations.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // returns false. | 74 // returns false. |
| 75 virtual bool AnimatedBoundsForBox(const gfx::BoxF& box, | 75 virtual bool AnimatedBoundsForBox(const gfx::BoxF& box, |
| 76 gfx::BoxF* bounds) const = 0; | 76 gfx::BoxF* bounds) const = 0; |
| 77 | 77 |
| 78 // Returns true if this animation affects scale. | 78 // Returns true if this animation affects scale. |
| 79 virtual bool AffectsScale() const = 0; | 79 virtual bool AffectsScale() const = 0; |
| 80 | 80 |
| 81 // Returns true if this animation is a translation. | 81 // Returns true if this animation is a translation. |
| 82 virtual bool IsTranslation() const = 0; | 82 virtual bool IsTranslation() const = 0; |
| 83 | 83 |
| 84 // Set |max_scale| to the maximum scale along any dimension during this | 84 // Set |max_scale| to the maximum scale along any dimension at the end of |
| 85 // animation. Returns false if the maximum scale cannot be computed. | 85 // intermediate animation target points (eg keyframe end points). Returns |
| 86 virtual bool MaximumScale(float* max_scale) const = 0; | 86 // false if the maximum scale cannot be computed. |
| 87 virtual bool MaximumTargetScale(float* max_scale) const = 0; |
| 87 | 88 |
| 88 // Partial Animation implementation. | 89 // Partial Animation implementation. |
| 89 virtual CurveType Type() const override; | 90 virtual CurveType Type() const override; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 class CC_EXPORT FilterAnimationCurve : public AnimationCurve { | 93 class CC_EXPORT FilterAnimationCurve : public AnimationCurve { |
| 93 public: | 94 public: |
| 94 virtual ~FilterAnimationCurve() {} | 95 virtual ~FilterAnimationCurve() {} |
| 95 | 96 |
| 96 virtual FilterOperations GetValue(double t) const = 0; | 97 virtual FilterOperations GetValue(double t) const = 0; |
| 97 virtual bool HasFilterThatMovesPixels() const = 0; | 98 virtual bool HasFilterThatMovesPixels() const = 0; |
| 98 | 99 |
| 99 // Partial Animation implementation. | 100 // Partial Animation implementation. |
| 100 virtual CurveType Type() const override; | 101 virtual CurveType Type() const override; |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace cc | 104 } // namespace cc |
| 104 | 105 |
| 105 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ | 106 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ |
| OLD | NEW |