OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "config.h" | |
6 | |
7 #include "WebAnimationCurveCommon.h" | |
8 | |
9 #include "CCTimingFunction.h" | |
10 | |
11 #include <wtf/OwnPtr.h> | |
12 #include <wtf/PassOwnPtr.h> | |
13 | |
14 namespace WebKit { | |
15 | |
16 PassOwnPtr<WebCore::CCTimingFunction> createTimingFunction(WebAnimationCurve::Ti
mingFunctionType type) | |
17 { | |
18 switch (type) { | |
19 case WebAnimationCurve::TimingFunctionTypeEase: | |
20 return WebCore::CCEaseTimingFunction::create(); | |
21 case WebAnimationCurve::TimingFunctionTypeEaseIn: | |
22 return WebCore::CCEaseInTimingFunction::create(); | |
23 case WebAnimationCurve::TimingFunctionTypeEaseOut: | |
24 return WebCore::CCEaseOutTimingFunction::create(); | |
25 case WebAnimationCurve::TimingFunctionTypeEaseInOut: | |
26 return WebCore::CCEaseInOutTimingFunction::create(); | |
27 case WebAnimationCurve::TimingFunctionTypeLinear: | |
28 return nullptr; | |
29 } | |
30 return nullptr; | |
31 } | |
32 | |
33 } // namespace WebKit | |
OLD | NEW |