Roll leveldb to r78 / 1.15.
[chromium-blink-merge.git] / webkit / renderer / compositor_bindings / web_animation_curve_common.cc
blob0104ea346a0c959456746094d0bb94d6bd544367
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.
5 #include "webkit/renderer/compositor_bindings/web_animation_curve_common.h"
7 #include "cc/animation/timing_function.h"
9 namespace webkit {
11 scoped_ptr<cc::TimingFunction> CreateTimingFunction(
12 blink::WebAnimationCurve::TimingFunctionType type) {
13 switch (type) {
14 case blink::WebAnimationCurve::TimingFunctionTypeEase:
15 return cc::EaseTimingFunction::Create();
16 case blink::WebAnimationCurve::TimingFunctionTypeEaseIn:
17 return cc::EaseInTimingFunction::Create();
18 case blink::WebAnimationCurve::TimingFunctionTypeEaseOut:
19 return cc::EaseOutTimingFunction::Create();
20 case blink::WebAnimationCurve::TimingFunctionTypeEaseInOut:
21 return cc::EaseInOutTimingFunction::Create();
22 case blink::WebAnimationCurve::TimingFunctionTypeLinear:
23 return scoped_ptr<cc::TimingFunction>();
25 return scoped_ptr<cc::TimingFunction>();
28 } // namespace webkit