summaryrefslogtreecommitdiffstats
path: root/cc/animation/target_property.h
diff options
context:
space:
mode:
authorloyso <loyso@chromium.org>2016-02-24 20:12:30 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-25 04:13:43 +0000
commit0c8e440950082a2b7f5eae1410264f75acdd0885 (patch)
tree26c436139e971b3ab9b09cf68528a0b124391c95 /cc/animation/target_property.h
parentde18d80600bb6e3413876e8d0af6c227ae504aa5 (diff)
downloadchromium_src-0c8e440950082a2b7f5eae1410264f75acdd0885.zip
chromium_src-0c8e440950082a2b7f5eae1410264f75acdd0885.tar.gz
chromium_src-0c8e440950082a2b7f5eae1410264f75acdd0885.tar.bz2
CC Animation: Expose TargetProperty enum to be aliased in Blink Platform.
TargetProperty is intended to be used as an alias in Source/platform/animation/CompositorTargetProperty.h This is slightly better then untyped approach used here: https://codereview.chromium.org/1599673002 where we setup struct with constants in it and pass uint32_t everywhere. An alternative approach with strongly typed enum considered too verbose: https://codereview.chromium.org/1698813002/ BUG=577016 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1700653002 Cr-Commit-Position: refs/heads/master@{#377501}
Diffstat (limited to 'cc/animation/target_property.h')
-rw-r--r--cc/animation/target_property.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/cc/animation/target_property.h b/cc/animation/target_property.h
new file mode 100644
index 0000000..e4658e1
--- /dev/null
+++ b/cc/animation/target_property.h
@@ -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.
+
+#ifndef CC_ANIMATION_TARGET_PROPERTY_H_
+#define CC_ANIMATION_TARGET_PROPERTY_H_
+
+namespace cc {
+
+namespace TargetProperty {
+
+enum Type {
+ TRANSFORM = 0,
+ OPACITY,
+ FILTER,
+ SCROLL_OFFSET,
+ BACKGROUND_COLOR,
+ // This sentinel must be last.
+ LAST_TARGET_PROPERTY = BACKGROUND_COLOR
+};
+
+const char* GetName(TargetProperty::Type property);
+
+} // namespace TargetProperty
+
+} // namespace cc
+
+#endif // CC_ANIMATION_TARGET_PROPERTY_H_