Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Side by Side Diff: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h

Issue 1698093005: Discard SampledEffects on elements if they are redundant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_renameToSampledEffect
Patch Set: Rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/InterpolationType.h" 8 #include "core/animation/InterpolationType.h"
9 #include "core/animation/PrimitiveInterpolation.h" 9 #include "core/animation/PrimitiveInterpolation.h"
10 #include "core/animation/PropertyInterpolationTypesMapping.h" 10 #include "core/animation/PropertyInterpolationTypesMapping.h"
(...skipping 10 matching lines...) Expand all
21 PropertyHandle property, 21 PropertyHandle property,
22 const InterpolationTypes& interpolationTypes, 22 const InterpolationTypes& interpolationTypes,
23 PassRefPtr<PropertySpecificKeyframe> startKeyframe, 23 PassRefPtr<PropertySpecificKeyframe> startKeyframe,
24 PassRefPtr<PropertySpecificKeyframe> endKeyframe) 24 PassRefPtr<PropertySpecificKeyframe> endKeyframe)
25 { 25 {
26 return adoptRef(new InvalidatableInterpolation(property, interpolationTy pes, startKeyframe, endKeyframe)); 26 return adoptRef(new InvalidatableInterpolation(property, interpolationTy pes, startKeyframe, endKeyframe));
27 } 27 }
28 28
29 PropertyHandle property() const final { return m_property; } 29 PropertyHandle property() const final { return m_property; }
30 virtual void interpolate(int iteration, double fraction); 30 virtual void interpolate(int iteration, double fraction);
31 bool dependsOnUnderlyingValue() const; 31 bool dependsOnUnderlyingValue() const final;
32 virtual void apply(InterpolationEnvironment&) const { ASSERT_NOT_REACHED(); } 32 virtual void apply(InterpolationEnvironment&) const { ASSERT_NOT_REACHED(); }
33 static void applyStack(const ActiveInterpolations&, InterpolationEnvironment &); 33 static void applyStack(const ActiveInterpolations&, InterpolationEnvironment &);
34 34
35 virtual bool isInvalidatableInterpolation() const { return true; } 35 virtual bool isInvalidatableInterpolation() const { return true; }
36 36
37 private: 37 private:
38 InvalidatableInterpolation( 38 InvalidatableInterpolation(
39 PropertyHandle property, 39 PropertyHandle property,
40 const InterpolationTypes& interpolationTypes, 40 const InterpolationTypes& interpolationTypes,
41 PassRefPtr<PropertySpecificKeyframe> startKeyframe, 41 PassRefPtr<PropertySpecificKeyframe> startKeyframe,
(...skipping 29 matching lines...) Expand all
71 mutable OwnPtr<PrimitiveInterpolation> m_cachedPairConversion; 71 mutable OwnPtr<PrimitiveInterpolation> m_cachedPairConversion;
72 mutable ConversionCheckers m_conversionCheckers; 72 mutable ConversionCheckers m_conversionCheckers;
73 mutable OwnPtr<TypedInterpolationValue> m_cachedValue; 73 mutable OwnPtr<TypedInterpolationValue> m_cachedValue;
74 }; 74 };
75 75
76 DEFINE_TYPE_CASTS(InvalidatableInterpolation, Interpolation, value, value->isInv alidatableInterpolation(), value.isInvalidatableInterpolation()); 76 DEFINE_TYPE_CASTS(InvalidatableInterpolation, Interpolation, value, value->isInv alidatableInterpolation(), value.isInvalidatableInterpolation());
77 77
78 } // namespace blink 78 } // namespace blink
79 79
80 #endif // InvalidatableInterpolation_h 80 #endif // InvalidatableInterpolation_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/Interpolation.h ('k') | third_party/WebKit/Source/core/animation/KeyframeEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698