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

Side by Side Diff: Source/core/animation/NonInterpolableValue.h

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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 NonInterpolableValue_h 5 #ifndef NonInterpolableValue_h
6 #define NonInterpolableValue_h 6 #define NonInterpolableValue_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // Holds components of a keyframe value that do not change when interpolating wi th another keyframe. 12 // Holds components of a keyframe value that do not change when interpolating wi th another keyframe.
13 class NonInterpolableValue : public RefCountedWillBeGarbageCollectedFinalized<No nInterpolableValue> { 13 class NonInterpolableValue : public GarbageCollectedFinalized<NonInterpolableVal ue> {
14 public: 14 public:
15 virtual ~NonInterpolableValue() { } 15 virtual ~NonInterpolableValue() { }
16 16
17 typedef const void* Type; 17 typedef const void* Type;
18 virtual Type type() const = 0; 18 virtual Type type() const = 0;
19 19
20 DEFINE_INLINE_VIRTUAL_TRACE() { } 20 DEFINE_INLINE_VIRTUAL_TRACE() { }
21 }; 21 };
22 22
23 // These macros provide safe downcasts of NonInterpolableValue subclasses with d ebug assertions. 23 // These macros provide safe downcasts of NonInterpolableValue subclasses with d ebug assertions.
24 // See CSSValueInterpolationType.cpp for example usage. 24 // See CSSValueInterpolationType.cpp for example usage.
25 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \ 25 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \
26 static Type staticType; \ 26 static Type staticType; \
27 virtual Type type() const { return staticType; } 27 virtual Type type() const { return staticType; }
28 28
29 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \ 29 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \
30 NonInterpolableValue::Type T::staticType = &T::staticType; 30 NonInterpolableValue::Type T::staticType = &T::staticType;
31 31
32 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \ 32 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \
33 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::static Type, value.type() == T::staticType); 33 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::static Type, value.type() == T::staticType);
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 #endif // NonInterpolableValue_h 37 #endif // NonInterpolableValue_h
OLDNEW
« no previous file with comments | « Source/core/animation/ListStyleInterpolationTest.cpp ('k') | Source/core/animation/NumberOptionalNumberSVGInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698