OLD | NEW |
(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/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>(TargetProperty::LAST_TARGET_PROPERTY) + 1 == |
| 18 arraysize(s_targetPropertyNames), |
| 19 "TargetPropertyEnumSize should equal the number of elements in " |
| 20 "s_targetPropertyNames"); |
| 21 |
| 22 } // namespace |
| 23 |
| 24 const char* TargetProperty::GetName(TargetProperty::Type property) { |
| 25 return s_targetPropertyNames[property]; |
| 26 } |
| 27 |
| 28 } // namespace cc |
OLD | NEW |