Chromium Code Reviews| Index: Source/core/animation/NonInterpolableValue.h |
| diff --git a/Source/core/animation/NonInterpolableValue.h b/Source/core/animation/NonInterpolableValue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a1a0fb64b73b58b51beb3b8da663b2357e55fdd3 |
| --- /dev/null |
| +++ b/Source/core/animation/NonInterpolableValue.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NonInterpolableValue_h |
| +#define NonInterpolableValue_h |
| + |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class NonInterpolableValue : public RefCountedWillBeGarbageCollectedFinalized<NonInterpolableValue> { |
| +public: |
| + typedef const void* Type; |
| + virtual Type type() const = 0; |
| + |
| + virtual ~NonInterpolableValue() { } |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() { } |
| +}; |
| + |
| +#define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \ |
|
shans
2015/05/28 05:48:14
This requires a very clear documented statement of
alancutter (OOO until 2018)
2015/06/01 07:35:29
Done.
|
| + static Type staticType; \ |
| + virtual Type type() const { return staticType; } |
| + |
| +#define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \ |
| + NonInterpolableValue::Type T::staticType = &T::staticType; |
| + |
| +#define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \ |
| + DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::staticType, value.type() == T::staticType); |
| + |
| +} // namespace blink |
| + |
| +#endif // NonInterpolableValue_h |