| Index: cc/animation/animation.cc
|
| diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
|
| index dfdaeb70e9c0f3ed4c9260547357ccd071223a9e..212cc2377ed84ae13e696c0f8c5d1f557bdde087 100644
|
| --- a/cc/animation/animation.cc
|
| +++ b/cc/animation/animation.cc
|
| @@ -27,18 +27,6 @@ static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 ==
|
| "RunStateEnumSize should equal the number of elements in "
|
| "s_runStateNames");
|
|
|
| -// This should match the TargetProperty enum.
|
| -static const char* const s_targetPropertyNames[] = {"TRANSFORM",
|
| - "OPACITY",
|
| - "FILTER",
|
| - "SCROLL_OFFSET",
|
| - "BACKGROUND_COLOR"};
|
| -
|
| -static_assert(static_cast<int>(cc::Animation::LAST_TARGET_PROPERTY) + 1 ==
|
| - arraysize(s_targetPropertyNames),
|
| - "TargetPropertyEnumSize should equal the number of elements in "
|
| - "s_targetPropertyNames");
|
| -
|
| } // namespace
|
|
|
| namespace cc {
|
| @@ -47,7 +35,7 @@ scoped_ptr<Animation> Animation::Create(
|
| scoped_ptr<AnimationCurve> curve,
|
| int animation_id,
|
| int group_id,
|
| - TargetProperty target_property) {
|
| + AnimationTargetProperty target_property) {
|
| return make_scoped_ptr(
|
| new Animation(std::move(curve), animation_id, group_id, target_property));
|
| }
|
| @@ -55,7 +43,7 @@ scoped_ptr<Animation> Animation::Create(
|
| Animation::Animation(scoped_ptr<AnimationCurve> curve,
|
| int animation_id,
|
| int group_id,
|
| - TargetProperty target_property)
|
| + AnimationTargetProperty target_property)
|
| : curve_(std::move(curve)),
|
| id_(animation_id),
|
| group_(group_id),
|
| @@ -85,11 +73,8 @@ void Animation::SetRunState(RunState run_state,
|
| return;
|
|
|
| char name_buffer[256];
|
| - base::snprintf(name_buffer,
|
| - sizeof(name_buffer),
|
| - "%s-%d",
|
| - s_targetPropertyNames[target_property_],
|
| - group_);
|
| + base::snprintf(name_buffer, sizeof(name_buffer), "%s-%d",
|
| + GetAnimationTargetPropertyName(target_property_), group_);
|
|
|
| bool is_waiting_to_start =
|
| run_state_ == WAITING_FOR_TARGET_AVAILABILITY || run_state_ == STARTING;
|
|
|