blob: 6823c1515e77af52a81eaf6f4c951a5a6e9d9d78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2019 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 THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_COMPOSITOR_KEYFRAME_VALUE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_COMPOSITOR_KEYFRAME_VALUE_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/css_value.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
namespace blink {
class CORE_EXPORT CompositorKeyframeValue
: public GarbageCollected<CompositorKeyframeValue> {
public:
virtual ~CompositorKeyframeValue() = default;
bool IsDouble() const { return GetType() == Type::kDouble; }
bool IsFilterOperations() const {
return GetType() == Type::kFilterOperations;
}
bool IsTransform() const { return GetType() == Type::kTransform; }
bool IsColor() const { return GetType() == Type::kColor; }
virtual void Trace(Visitor*) {}
enum class Type {
kDouble,
kFilterOperations,
kTransform,
kColor,
};
virtual Type GetType() const = 0;
};
#define DEFINE_COMPOSITOR_KEYFRAME_VALUE_TYPE_CASTS(thisType, predicate) \
DEFINE_TYPE_CASTS(thisType, CompositorKeyframeValue, value, \
value->predicate, value.predicate)
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_CSS_COMPOSITOR_KEYFRAME_VALUE_H_
|