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_TRANSFORM_ANIMATION_CURVE_IMPL_H_ | |
6 #define CC_BLINK_WEB_TRANSFORM_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/WebTransformAnimationCurve.h" | |
12 | |
13 namespace cc { | |
14 class AnimationCurve; | |
15 class KeyframedTransformAnimationCurve; | |
16 } | |
17 | |
18 namespace blink { | |
19 class WebTransformKeyframe; | |
20 } | |
21 | |
22 namespace cc_blink { | |
23 | |
24 class WebTransformAnimationCurveImpl | |
25 : public blink::WebTransformAnimationCurve { | |
26 public: | |
27 CC_BLINK_EXPORT WebTransformAnimationCurveImpl(); | |
28 ~WebTransformAnimationCurveImpl() override; | |
29 | |
30 // blink::WebCompositorAnimationCurve implementation. | |
31 AnimationCurveType type() const override; | |
32 | |
33 // blink::WebTransformAnimationCurve implementation. | |
34 void add(const blink::WebTransformKeyframe& keyframe) override; | |
35 void add(const blink::WebTransformKeyframe& keyframe, | |
36 TimingFunctionType type) override; | |
37 void add(const blink::WebTransformKeyframe& keyframe, | |
38 double x1, | |
39 double y1, | |
40 double x2, | |
41 double y2) override; | |
42 void add(const blink::WebTransformKeyframe& keyframe, | |
43 int steps, | |
44 float stepsStartOffset) override; | |
45 void setLinearTimingFunction() override; | |
46 void setCubicBezierTimingFunction(TimingFunctionType) override; | |
47 void setCubicBezierTimingFunction(double x1, | |
48 double y1, | |
49 double x2, | |
50 double y2) override; | |
51 void setStepsTimingFunction(int number_of_steps, | |
52 float steps_start_offset) override; | |
53 | |
54 scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const; | |
55 | |
56 private: | |
57 scoped_ptr<cc::KeyframedTransformAnimationCurve> curve_; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(WebTransformAnimationCurveImpl); | |
60 }; | |
61 | |
62 } // namespace cc_blink | |
63 | |
64 #endif // CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ | |
OLD | NEW |