| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "WebFloatAnimationCurveImpl.h" | 7 #include "WebFloatAnimationCurveImpl.h" |
| 8 | 8 |
| 9 #include "CCAnimationCurve.h" | 9 #include "CCAnimationCurve.h" |
| 10 #include "CCKeyframedAnimationCurve.h" | 10 #include "CCKeyframedAnimationCurve.h" |
| 11 #include "CCTimingFunction.h" | 11 #include "CCTimingFunction.h" |
| 12 #include "WebAnimationCurveCommon.h" | 12 #include "WebAnimationCurveCommon.h" |
| 13 #include <wtf/OwnPtr.h> | 13 #include <wtf/OwnPtr.h> |
| 14 #include <wtf/PassOwnPtr.h> | 14 #include <wtf/PassOwnPtr.h> |
| 15 | 15 |
| 16 namespace WebKit { | 16 namespace WebKit { |
| 17 | 17 |
| 18 WebFloatAnimationCurve* WebFloatAnimationCurve::create() | 18 WebFloatAnimationCurve* WebFloatAnimationCurve::create() |
| 19 { | 19 { |
| 20 return new WebFloatAnimationCurveImpl(WebCore::CCKeyframedFloatAnimationCurv
e::create()); | 20 return new WebFloatAnimationCurveImpl(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl(PassOwnPtr<WebCore::CCKey
framedFloatAnimationCurve> curve) | 23 WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl() |
| 24 : m_curve(curve) | 24 : m_curve(WebCore::CCKeyframedFloatAnimationCurve::create()) |
| 25 { | 25 { |
| 26 } | 26 } |
| 27 | 27 |
| 28 WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() | 28 WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() |
| 29 { | 29 { |
| 30 } | 30 } |
| 31 | 31 |
| 32 WebAnimationCurve::AnimationCurveType WebFloatAnimationCurveImpl::type() const | 32 WebAnimationCurve::AnimationCurveType WebFloatAnimationCurveImpl::type() const |
| 33 { | 33 { |
| 34 return WebAnimationCurve::AnimationCurveTypeFloat; | 34 return WebAnimationCurve::AnimationCurveTypeFloat; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 53 { | 53 { |
| 54 return m_curve->getValue(time); | 54 return m_curve->getValue(time); |
| 55 } | 55 } |
| 56 | 56 |
| 57 PassOwnPtr<WebCore::CCAnimationCurve> WebFloatAnimationCurveImpl::cloneToCCAnima
tionCurve() const | 57 PassOwnPtr<WebCore::CCAnimationCurve> WebFloatAnimationCurveImpl::cloneToCCAnima
tionCurve() const |
| 58 { | 58 { |
| 59 return m_curve->clone(); | 59 return m_curve->clone(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace WebKit | 62 } // namespace WebKit |
| OLD | NEW |