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