Index: cc/animation/animation_target_property.cc |
diff --git a/cc/animation/animation_target_property.cc b/cc/animation/animation_target_property.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..324706aefcd72b94f428d5a9c846a02993668489 |
--- /dev/null |
+++ b/cc/animation/animation_target_property.cc |
@@ -0,0 +1,34 @@ |
+// 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. |
+ |
+#include "cc/animation/animation_target_property.h" |
+ |
+#include "base/macros.h" |
+ |
+namespace cc { |
+ |
+namespace { |
+ |
+// This should match the TargetProperty enum. |
+static const char* const s_targetPropertyNames[] = { |
+ "TRANSFORM", "OPACITY", "FILTER", "SCROLL_OFFSET", "BACKGROUND_COLOR"}; |
+ |
+static_assert(static_cast<int>(AnimationTargetProperty::LAST_TARGET_PROPERTY) + |
+ 1 == |
+ arraysize(s_targetPropertyNames), |
+ "TargetPropertyEnumSize should equal the number of elements in " |
+ "s_targetPropertyNames"); |
+ |
+} // namespace |
+ |
+const char* GetAnimationTargetPropertyName(AnimationTargetProperty property) { |
+ return s_targetPropertyNames[static_cast<int>(property)]; |
+} |
+ |
+std::ostream& operator<<(std::ostream& out, AnimationTargetProperty property) { |
+ out << GetAnimationTargetPropertyName(property); |
+ return out; |
+} |
+ |
+} // namespace cc |