Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: cc/animation/target_property.cc

Issue 1700653002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/target_property.h ('k') | cc/blink/web_to_cc_animation_delegate_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/target_property.cc
diff --git a/cc/animation/target_property.cc b/cc/animation/target_property.cc
new file mode 100644
index 0000000000000000000000000000000000000000..15144a7cf5f84e6ab22de16a30902749bb1621f0
--- /dev/null
+++ b/cc/animation/target_property.cc
@@ -0,0 +1,28 @@
+// 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/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>(TargetProperty::LAST_TARGET_PROPERTY) + 1 ==
+ arraysize(s_targetPropertyNames),
+ "TargetPropertyEnumSize should equal the number of elements in "
+ "s_targetPropertyNames");
+
+} // namespace
+
+const char* TargetProperty::GetName(TargetProperty::Type property) {
+ return s_targetPropertyNames[property];
+}
+
+} // namespace cc
« no previous file with comments | « cc/animation/target_property.h ('k') | cc/blink/web_to_cc_animation_delegate_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698