Chromium Code Reviews| Index: cc/animation/animation_target_property.h |
| diff --git a/cc/animation/animation_target_property.h b/cc/animation/animation_target_property.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..56bc22591c4e0ca6f51b6289421f92a1270c699d |
| --- /dev/null |
| +++ b/cc/animation/animation_target_property.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2016 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 CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ |
| +#define CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ |
| + |
| +#include <functional> |
| +#include <ostream> |
| + |
| +#include "cc/base/cc_export.h" |
| + |
| +namespace cc { |
| + |
| +enum class AnimationTargetProperty : int { |
| + TRANSFORM = 0, |
| + OPACITY, |
| + FILTER, |
| + SCROLL_OFFSET, |
| + BACKGROUND_COLOR, |
| + // This sentinel must be last. |
| + LAST_TARGET_PROPERTY = BACKGROUND_COLOR |
| +}; |
| + |
| +const char* GetAnimationTargetPropertyName(AnimationTargetProperty property); |
| + |
| +std::ostream& CC_EXPORT operator<<(std::ostream& out, |
| + AnimationTargetProperty property); |
| + |
| +} // namespace cc |
| + |
| +namespace std { |
| + |
| +template <> |
| +inline size_t hash<cc::AnimationTargetProperty>::operator()( |
|
jbroman
2016/02/16 15:56:43
http://chromium-cpp.appspot.com/ and the Google C+
|
| + cc::AnimationTargetProperty property) const { |
| + return static_cast<size_t>(property); |
| +} |
| +} |
|
loyso (OOO)
2016/02/15 06:40:37
We need some common traits (a macro) to work with
|
| + |
| +#endif // CC_ANIMATION_ANIMATION_TARGET_PROPERTY_H_ |