OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ | |
6 #define CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ | |
7 | |
8 #include <functional> | |
9 #include <ostream> | |
10 | |
11 #include "cc/base/cc_export.h" | |
12 | |
13 namespace cc { | |
14 | |
15 enum class AnimationTargetProperty : int { | |
16 TRANSFORM = 0, | |
17 OPACITY, | |
18 FILTER, | |
19 SCROLL_OFFSET, | |
20 BACKGROUND_COLOR, | |
21 // This sentinel must be last. | |
22 LAST_TARGET_PROPERTY = BACKGROUND_COLOR | |
23 }; | |
24 | |
25 const char* GetAnimationTargetPropertyName(AnimationTargetProperty property); | |
26 | |
27 std::ostream& CC_EXPORT operator<<(std::ostream& out, | |
28 AnimationTargetProperty property); | |
29 | |
30 } // namespace cc | |
31 | |
32 namespace std { | |
33 | |
34 template <> | |
35 inline size_t hash<cc::AnimationTargetProperty>::operator()( | |
jbroman
2016/02/16 15:56:43
http://chromium-cpp.appspot.com/ and the Google C+
| |
36 cc::AnimationTargetProperty property) const { | |
37 return static_cast<size_t>(property); | |
38 } | |
39 } | |
loyso (OOO)
2016/02/15 06:40:37
We need some common traits (a macro) to work with
| |
40 | |
41 #endif // CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ | |
OLD | NEW |