OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 #ifndef CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ | |
6 #define CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "cc/blink/cc_blink_export.h" | |
11 #include "third_party/WebKit/public/platform/WebFloatAnimationCurve.h" | |
12 | |
13 namespace cc { | |
14 class AnimationCurve; | |
15 class KeyframedFloatAnimationCurve; | |
16 } | |
17 | |
18 namespace blink { | |
19 struct WebFloatKeyframe; | |
20 } | |
21 | |
22 namespace cc_blink { | |
23 | |
24 class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve { | |
25 public: | |
26 CC_BLINK_EXPORT WebFloatAnimationCurveImpl(); | |
27 ~WebFloatAnimationCurveImpl() override; | |
28 | |
29 // WebCompositorAnimationCurve implementation. | |
30 AnimationCurveType type() const override; | |
31 | |
32 // WebFloatAnimationCurve implementation. | |
33 void add(const blink::WebFloatKeyframe& keyframe) override; | |
34 void add(const blink::WebFloatKeyframe& keyframe, | |
35 TimingFunctionType type) override; | |
36 void add(const blink::WebFloatKeyframe& keyframe, | |
37 double x1, | |
38 double y1, | |
39 double x2, | |
40 double y2) override; | |
41 void add(const blink::WebFloatKeyframe& keyframe, | |
42 int steps, | |
43 float steps_start_offset) override; | |
44 void setLinearTimingFunction() override; | |
45 void setCubicBezierTimingFunction(TimingFunctionType) override; | |
46 void setCubicBezierTimingFunction(double x1, | |
47 double y1, | |
48 double x2, | |
49 double y2) override; | |
50 void setStepsTimingFunction(int number_of_steps, | |
51 float steps_start_offset) override; | |
52 | |
53 float getValue(double time) const override; | |
54 | |
55 scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const; | |
56 | |
57 private: | |
58 scoped_ptr<cc::KeyframedFloatAnimationCurve> curve_; | |
59 | |
60 DISALLOW_COPY_AND_ASSIGN(WebFloatAnimationCurveImpl); | |
61 }; | |
62 | |
63 } // namespace cc_blink | |
64 | |
65 #endif // CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ | |
OLD | NEW |