| Index: cc/test/animation_timelines_test_common.h
|
| diff --git a/cc/test/animation_timelines_test_common.h b/cc/test/animation_timelines_test_common.h
|
| index 2f1388eabb0e5c6b3a9f38520922a6d8b5b57221..d32172668f8357b1962f6511cc234671d4532ec4 100644
|
| --- a/cc/test/animation_timelines_test_common.h
|
| +++ b/cc/test/animation_timelines_test_common.h
|
| @@ -29,34 +29,38 @@ class TestLayer {
|
| void set_transform(int transform_x, int transform_y) {
|
| transform_x_ = transform_x;
|
| transform_y_ = transform_y;
|
| - mutated_properties_[Animation::TRANSFORM] = true;
|
| + mutated_properties_[ToIndex(AnimationTargetProperty::TRANSFORM)] = true;
|
| }
|
|
|
| float opacity() const { return opacity_; }
|
| void set_opacity(float opacity) {
|
| opacity_ = opacity;
|
| - mutated_properties_[Animation::OPACITY] = true;
|
| + mutated_properties_[ToIndex(AnimationTargetProperty::OPACITY)] = true;
|
| }
|
|
|
| float brightness() const { return brightness_; }
|
| void set_brightness(float brightness) {
|
| brightness_ = brightness;
|
| - mutated_properties_[Animation::FILTER] = true;
|
| + mutated_properties_[ToIndex(AnimationTargetProperty::FILTER)] = true;
|
| }
|
|
|
| gfx::ScrollOffset scroll_offset() const { return scroll_offset_; }
|
| void set_scroll_offset(const gfx::ScrollOffset& scroll_offset) {
|
| scroll_offset_ = scroll_offset;
|
| - mutated_properties_[Animation::SCROLL_OFFSET] = true;
|
| + mutated_properties_[ToIndex(AnimationTargetProperty::SCROLL_OFFSET)] = true;
|
| }
|
|
|
| - bool is_property_mutated(Animation::TargetProperty property) const {
|
| - return mutated_properties_[property];
|
| + bool is_property_mutated(AnimationTargetProperty property) const {
|
| + return mutated_properties_[ToIndex(property)];
|
| }
|
|
|
| private:
|
| TestLayer();
|
|
|
| + static int ToIndex(AnimationTargetProperty property) {
|
| + return static_cast<int>(property);
|
| + }
|
| +
|
| int transform_x_;
|
| int transform_y_;
|
|
|
| @@ -64,7 +68,9 @@ class TestLayer {
|
| float brightness_;
|
| gfx::ScrollOffset scroll_offset_;
|
|
|
| - bool mutated_properties_[Animation::LAST_TARGET_PROPERTY + 1];
|
| + static const int kLastTargetProperty =
|
| + static_cast<int>(AnimationTargetProperty::LAST_TARGET_PROPERTY);
|
| + bool mutated_properties_[kLastTargetProperty + 1];
|
| };
|
|
|
| class TestHostClient : public MutatorHostClient {
|
| @@ -117,7 +123,7 @@ class TestHostClient : public MutatorHostClient {
|
|
|
| bool IsPropertyMutated(int layer_id,
|
| LayerTreeType tree_type,
|
| - Animation::TargetProperty property) const;
|
| + AnimationTargetProperty property) const;
|
|
|
| void ExpectFilterPropertyMutated(int layer_id,
|
| LayerTreeType tree_type,
|
| @@ -147,13 +153,13 @@ class TestAnimationDelegate : public AnimationDelegate {
|
| TestAnimationDelegate();
|
|
|
| void NotifyAnimationStarted(base::TimeTicks monotonic_time,
|
| - Animation::TargetProperty target_property,
|
| + AnimationTargetProperty target_property,
|
| int group) override;
|
| void NotifyAnimationFinished(base::TimeTicks monotonic_time,
|
| - Animation::TargetProperty target_property,
|
| + AnimationTargetProperty target_property,
|
| int group) override;
|
| void NotifyAnimationAborted(base::TimeTicks monotonic_time,
|
| - Animation::TargetProperty target_property,
|
| + AnimationTargetProperty target_property,
|
| int group) override {}
|
| bool started_;
|
| bool finished_;
|
|
|