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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
10 #include "cc/animation/keyframed_animation_curve.h" | 10 #include "cc/animation/keyframed_animation_curve.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 blink::CompositorAnimation::FillMode CompositorAnimation::getFillMode() const | 114 blink::CompositorAnimation::FillMode CompositorAnimation::getFillMode() const |
115 { | 115 { |
116 return m_animation->fill_mode(); | 116 return m_animation->fill_mode(); |
117 } | 117 } |
118 | 118 |
119 void CompositorAnimation::setFillMode(FillMode fillMode) | 119 void CompositorAnimation::setFillMode(FillMode fillMode) |
120 { | 120 { |
121 m_animation->set_fill_mode(fillMode); | 121 m_animation->set_fill_mode(fillMode); |
122 } | 122 } |
123 | 123 |
124 std::unique_ptr<cc::Animation> CompositorAnimation::passAnimation() | 124 std::unique_ptr<cc::Animation> CompositorAnimation::releaseCcAnimation() |
125 { | 125 { |
126 m_animation->set_needs_synchronized_start_time(true); | 126 m_animation->set_needs_synchronized_start_time(true); |
127 return std::move(m_animation); | 127 return std::move(m_animation); |
128 } | 128 } |
129 | 129 |
130 std::unique_ptr<CompositorFloatAnimationCurve> CompositorAnimation::floatCurveFo
rTesting() const | 130 std::unique_ptr<CompositorFloatAnimationCurve> CompositorAnimation::floatCurveFo
rTesting() const |
131 { | 131 { |
132 const cc::AnimationCurve* curve = m_animation->curve(); | 132 const cc::AnimationCurve* curve = m_animation->curve(); |
133 DCHECK_EQ(cc::AnimationCurve::FLOAT, curve->Type()); | 133 DCHECK_EQ(cc::AnimationCurve::FLOAT, curve->Type()); |
134 | 134 |
135 auto keyframedCurve = base::WrapUnique(static_cast<cc::KeyframedFloatAnimati
onCurve*>(curve->Clone().release())); | 135 auto keyframedCurve = base::WrapUnique(static_cast<cc::KeyframedFloatAnimati
onCurve*>(curve->Clone().release())); |
136 return CompositorFloatAnimationCurve::createForTesting(std::move(keyframedCu
rve)); | 136 return CompositorFloatAnimationCurve::createForTesting(std::move(keyframedCu
rve)); |
137 } | 137 } |
138 | 138 |
139 } // namespace blink | 139 } // namespace blink |
OLD | NEW |