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

Side by Side Diff: cc/animation/animation_target_property.cc

Issue 1698813002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use custom hash in unordered_set. 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 unified diff | Download patch
OLDNEW
(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 #include "cc/animation/animation_target_property.h"
6
7 #include "base/macros.h"
8
9 namespace cc {
10
11 namespace {
12
13 // This should match the TargetProperty enum.
14 static const char* const s_targetPropertyNames[] = {
15 "TRANSFORM", "OPACITY", "FILTER", "SCROLL_OFFSET", "BACKGROUND_COLOR"};
16
17 static_assert(static_cast<int>(AnimationTargetProperty::LAST_TARGET_PROPERTY) +
18 1 ==
19 arraysize(s_targetPropertyNames),
20 "TargetPropertyEnumSize should equal the number of elements in "
21 "s_targetPropertyNames");
22
23 } // namespace
24
25 const char* GetAnimationTargetPropertyName(AnimationTargetProperty property) {
26 return s_targetPropertyNames[static_cast<int>(property)];
27 }
28
29 std::ostream& operator<<(std::ostream& out, AnimationTargetProperty property) {
30 out << GetAnimationTargetPropertyName(property);
31 return out;
32 }
33
34 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698