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 "webkit/compositor_bindings/web_animation_curve_common.h" | 5 #include "webkit/renderer/compositor_bindings/web_animation_curve_common.h" |
6 | 6 |
7 #include "cc/animation/timing_function.h" | 7 #include "cc/animation/timing_function.h" |
8 | 8 |
9 namespace webkit { | 9 namespace webkit { |
10 | 10 |
11 scoped_ptr<cc::TimingFunction> CreateTimingFunction( | 11 scoped_ptr<cc::TimingFunction> CreateTimingFunction( |
12 WebKit::WebAnimationCurve::TimingFunctionType type) { | 12 WebKit::WebAnimationCurve::TimingFunctionType type) { |
13 switch (type) { | 13 switch (type) { |
14 case WebKit::WebAnimationCurve::TimingFunctionTypeEase: | 14 case WebKit::WebAnimationCurve::TimingFunctionTypeEase: |
15 return cc::EaseTimingFunction::Create(); | 15 return cc::EaseTimingFunction::Create(); |
16 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseIn: | 16 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseIn: |
17 return cc::EaseInTimingFunction::Create(); | 17 return cc::EaseInTimingFunction::Create(); |
18 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseOut: | 18 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseOut: |
19 return cc::EaseOutTimingFunction::Create(); | 19 return cc::EaseOutTimingFunction::Create(); |
20 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseInOut: | 20 case WebKit::WebAnimationCurve::TimingFunctionTypeEaseInOut: |
21 return cc::EaseInOutTimingFunction::Create(); | 21 return cc::EaseInOutTimingFunction::Create(); |
22 case WebKit::WebAnimationCurve::TimingFunctionTypeLinear: | 22 case WebKit::WebAnimationCurve::TimingFunctionTypeLinear: |
23 return scoped_ptr<cc::TimingFunction>(); | 23 return scoped_ptr<cc::TimingFunction>(); |
24 } | 24 } |
25 return scoped_ptr<cc::TimingFunction>(); | 25 return scoped_ptr<cc::TimingFunction>(); |
26 } | 26 } |
27 | 27 |
28 } // namespace WebKit | 28 } // namespace WebKit |
OLD | NEW |