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

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

Issue 1607633003: Code cleanup: Remove SVGInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused assertion variable to make release compile Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 Interpolation_h 5 #ifndef Interpolation_h
6 #define Interpolation_h 6 #define Interpolation_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/InterpolableValue.h" 9 #include "core/animation/InterpolableValue.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class PropertyHandle; 14 class PropertyHandle;
15 15
16 class CORE_EXPORT Interpolation : public RefCounted<Interpolation> { 16 class CORE_EXPORT Interpolation : public RefCounted<Interpolation> {
17 WTF_MAKE_NONCOPYABLE(Interpolation); 17 WTF_MAKE_NONCOPYABLE(Interpolation);
18 public: 18 public:
19 virtual ~Interpolation(); 19 virtual ~Interpolation();
20 20
21 virtual void interpolate(int iteration, double fraction); 21 virtual void interpolate(int iteration, double fraction);
22 22
23 virtual bool isStyleInterpolation() const { return false; } 23 virtual bool isStyleInterpolation() const { return false; }
24 virtual bool isInvalidatableInterpolation() const { return false; } 24 virtual bool isInvalidatableInterpolation() const { return false; }
25 virtual bool isLegacyStyleInterpolation() const { return false; } 25 virtual bool isLegacyStyleInterpolation() const { return false; }
26 virtual bool isSVGInterpolation() const { return false; }
27 26
28 virtual PropertyHandle property() const = 0; 27 virtual PropertyHandle property() const = 0;
29 28
30 protected: 29 protected:
31 const OwnPtr<InterpolableValue> m_start; 30 const OwnPtr<InterpolableValue> m_start;
32 const OwnPtr<InterpolableValue> m_end; 31 const OwnPtr<InterpolableValue> m_end;
33 32
34 mutable double m_cachedFraction; 33 mutable double m_cachedFraction;
35 mutable int m_cachedIteration; 34 mutable int m_cachedIteration;
36 mutable OwnPtr<InterpolableValue> m_cachedValue; 35 mutable OwnPtr<InterpolableValue> m_cachedValue;
37 36
38 Interpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableVa lue> end); 37 Interpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableVa lue> end);
39 38
40 private: 39 private:
41 InterpolableValue* getCachedValueForTesting() const { return m_cachedValue.g et(); } 40 InterpolableValue* getCachedValueForTesting() const { return m_cachedValue.g et(); }
42 41
43 friend class AnimationInterpolableValueTest; 42 friend class AnimationInterpolableValueTest;
44 friend class AnimationInterpolationEffectTest; 43 friend class AnimationInterpolationEffectTest;
45 friend class AnimationDoubleStyleInterpolationTest; 44 friend class AnimationDoubleStyleInterpolationTest;
46 friend class AnimationVisibilityStyleInterpolationTest; 45 friend class AnimationVisibilityStyleInterpolationTest;
47 friend class AnimationColorStyleInterpolationTest;
48 friend class AnimationSVGStrokeDasharrayStyleInterpolationTest;
49 }; 46 };
50 47
51 using ActiveInterpolations = Vector<RefPtr<Interpolation>, 1>; 48 using ActiveInterpolations = Vector<RefPtr<Interpolation>, 1>;
52 49
53 } // namespace blink 50 } // namespace blink
54 51
55 #endif // Interpolation_h 52 #endif // Interpolation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698