OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/animation/CompositorAnimation.h" | 5 #include "platform/animation/CompositorAnimation.h" |
6 | 6 |
7 #include "cc/animation/animation_curve.h" | 7 #include "cc/animation/animation_curve.h" |
8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
9 #include "platform/animation/CompositorAnimationCurve.h" | 9 #include "platform/animation/CompositorAnimationCurve.h" |
10 #include "platform/animation/CompositorFilterAnimationCurve.h" | 10 #include "platform/animation/CompositorFilterAnimationCurve.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 CompositorAnimation::CompositorAnimation(const CompositorAnimationCurve& curve,
CompositorTargetProperty::Type targetProperty, int animationId, int groupId) | 23 CompositorAnimation::CompositorAnimation(const CompositorAnimationCurve& curve,
CompositorTargetProperty::Type targetProperty, int animationId, int groupId) |
24 { | 24 { |
25 if (!animationId) | 25 if (!animationId) |
26 animationId = AnimationIdProvider::NextAnimationId(); | 26 animationId = AnimationIdProvider::NextAnimationId(); |
27 if (!groupId) | 27 if (!groupId) |
28 groupId = AnimationIdProvider::NextGroupId(); | 28 groupId = AnimationIdProvider::NextGroupId(); |
29 | 29 |
30 m_animation = Animation::Create(curve.cloneToAnimationCurve(), animationId,
groupId, targetProperty); | 30 m_animation = Animation::Create(curve.cloneToAnimationCurve(), animationId,
groupId, targetProperty); |
31 } | 31 } |
32 | 32 |
33 CompositorAnimation::CompositorAnimation() {} | |
34 | |
35 CompositorAnimation::~CompositorAnimation() {} | 33 CompositorAnimation::~CompositorAnimation() {} |
36 | 34 |
37 int CompositorAnimation::id() | 35 int CompositorAnimation::id() const |
38 { | 36 { |
39 return m_animation->id(); | 37 return m_animation->id(); |
40 } | 38 } |
41 | 39 |
42 int CompositorAnimation::group() | 40 int CompositorAnimation::group() const |
43 { | 41 { |
44 return m_animation->group(); | 42 return m_animation->group(); |
45 } | 43 } |
46 | 44 |
47 CompositorTargetProperty::Type CompositorAnimation::targetProperty() const | 45 CompositorTargetProperty::Type CompositorAnimation::targetProperty() const |
48 { | 46 { |
49 return m_animation->target_property(); | 47 return m_animation->target_property(); |
50 } | 48 } |
51 | 49 |
52 double CompositorAnimation::iterations() const | 50 double CompositorAnimation::iterations() const |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 m_animation->set_fill_mode(fillMode); | 118 m_animation->set_fill_mode(fillMode); |
121 } | 119 } |
122 | 120 |
123 std::unique_ptr<cc::Animation> CompositorAnimation::passAnimation() | 121 std::unique_ptr<cc::Animation> CompositorAnimation::passAnimation() |
124 { | 122 { |
125 m_animation->set_needs_synchronized_start_time(true); | 123 m_animation->set_needs_synchronized_start_time(true); |
126 return std::move(m_animation); | 124 return std::move(m_animation); |
127 } | 125 } |
128 | 126 |
129 } // namespace blink | 127 } // namespace blink |
OLD | NEW |