| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 InvalidatableInterpolation_h | 5 #ifndef InvalidatableInterpolation_h |
| 6 #define InvalidatableInterpolation_h | 6 #define InvalidatableInterpolation_h |
| 7 | 7 |
| 8 #include "core/animation/Interpolation.h" | 8 #include "core/animation/Interpolation.h" |
| 9 #include "core/animation/InterpolationType.h" | 9 #include "core/animation/InterpolationType.h" |
| 10 #include "core/animation/InterpolationTypesMap.h" | 10 #include "core/animation/InterpolationTypesMap.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 virtual void apply(InterpolationEnvironment&) const { NOTREACHED(); } | 33 virtual void apply(InterpolationEnvironment&) const { NOTREACHED(); } |
| 34 static void applyStack(const ActiveInterpolations&, | 34 static void applyStack(const ActiveInterpolations&, |
| 35 InterpolationEnvironment&); | 35 InterpolationEnvironment&); |
| 36 | 36 |
| 37 virtual bool isInvalidatableInterpolation() const { return true; } | 37 virtual bool isInvalidatableInterpolation() const { return true; } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 InvalidatableInterpolation(PropertyHandle property, | 40 InvalidatableInterpolation(PropertyHandle property, |
| 41 PassRefPtr<PropertySpecificKeyframe> startKeyframe, | 41 PassRefPtr<PropertySpecificKeyframe> startKeyframe, |
| 42 PassRefPtr<PropertySpecificKeyframe> endKeyframe) | 42 PassRefPtr<PropertySpecificKeyframe> endKeyframe) |
| 43 : Interpolation(nullptr, nullptr), | 43 : Interpolation(), |
| 44 m_property(property), | 44 m_property(property), |
| 45 m_interpolationTypes(nullptr), | 45 m_interpolationTypes(nullptr), |
| 46 m_interpolationTypesVersion(0), | 46 m_interpolationTypesVersion(0), |
| 47 m_startKeyframe(startKeyframe), | 47 m_startKeyframe(startKeyframe), |
| 48 m_endKeyframe(endKeyframe), | 48 m_endKeyframe(endKeyframe), |
| 49 m_currentFraction(std::numeric_limits<double>::quiet_NaN()), | 49 m_currentFraction(std::numeric_limits<double>::quiet_NaN()), |
| 50 m_isConversionCached(false) {} | 50 m_isConversionCached(false) {} |
| 51 | 51 |
| 52 using ConversionCheckers = InterpolationType::ConversionCheckers; | 52 using ConversionCheckers = InterpolationType::ConversionCheckers; |
| 53 | 53 |
| 54 InterpolableValue* getCachedValueForTesting() const final { |
| 55 // TODO(suzyh): Add meaningful implementation here |
| 56 NOTREACHED(); |
| 57 return nullptr; |
| 58 } |
| 54 std::unique_ptr<TypedInterpolationValue> maybeConvertUnderlyingValue( | 59 std::unique_ptr<TypedInterpolationValue> maybeConvertUnderlyingValue( |
| 55 const InterpolationEnvironment&) const; | 60 const InterpolationEnvironment&) const; |
| 56 const TypedInterpolationValue* ensureValidConversion( | 61 const TypedInterpolationValue* ensureValidConversion( |
| 57 const InterpolationEnvironment&, | 62 const InterpolationEnvironment&, |
| 58 const UnderlyingValueOwner&) const; | 63 const UnderlyingValueOwner&) const; |
| 59 void ensureValidInterpolationTypes(const InterpolationEnvironment&) const; | 64 void ensureValidInterpolationTypes(const InterpolationEnvironment&) const; |
| 60 void clearConversionCache() const; | 65 void clearConversionCache() const; |
| 61 bool isConversionCacheValid(const InterpolationEnvironment&, | 66 bool isConversionCacheValid(const InterpolationEnvironment&, |
| 62 const UnderlyingValueOwner&) const; | 67 const UnderlyingValueOwner&) const; |
| 63 bool isNeutralKeyframeActive() const; | 68 bool isNeutralKeyframeActive() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 87 | 92 |
| 88 DEFINE_TYPE_CASTS(InvalidatableInterpolation, | 93 DEFINE_TYPE_CASTS(InvalidatableInterpolation, |
| 89 Interpolation, | 94 Interpolation, |
| 90 value, | 95 value, |
| 91 value->isInvalidatableInterpolation(), | 96 value->isInvalidatableInterpolation(), |
| 92 value.isInvalidatableInterpolation()); | 97 value.isInvalidatableInterpolation()); |
| 93 | 98 |
| 94 } // namespace blink | 99 } // namespace blink |
| 95 | 100 |
| 96 #endif // InvalidatableInterpolation_h | 101 #endif // InvalidatableInterpolation_h |
| OLD | NEW |