Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorFilterAnimationCurve.h

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix copyrights and years. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 CompositorFilterAnimationCurve_h
6 #define CompositorFilterAnimationCurve_h
7
8 #include "base/memory/scoped_ptr.h"
9 #include "platform/PlatformExport.h"
10 #include "platform/animation/CompositorAnimationCurve.h"
11 #include "platform/animation/CompositorFilterKeyframe.h"
12 #include "wtf/Noncopyable.h"
13
14 namespace cc {
15 class AnimationCurve;
16 class KeyframedFilterAnimationCurve;
17 }
18
19 namespace blink {
20 class CompositorFilterKeyframe;
21 }
22
23 namespace blink {
24
25 // A keyframed filter animation curve.
26 class PLATFORM_EXPORT CompositorFilterAnimationCurve : public CompositorAnimatio nCurve {
27 WTF_MAKE_NONCOPYABLE(CompositorFilterAnimationCurve);
28 public:
29 CompositorFilterAnimationCurve();
30 ~CompositorFilterAnimationCurve() override;
31
32 virtual void add(const CompositorFilterKeyframe&, TimingFunctionType = Timin gFunctionTypeEase);
33 // Adds the keyframe with a custom, bezier timing function. Note, it is
34 // assumed that x0 = y0, and x3 = y3 = 1.
35 virtual void add(const CompositorFilterKeyframe&, double x1, double y1, doub le x2, double y2);
36 // Adds the keyframe with a steps timing function.
37 virtual void add(const CompositorFilterKeyframe&, int steps, float stepsStar tOffset);
38
39 virtual void setLinearTimingFunction();
40 virtual void setCubicBezierTimingFunction(TimingFunctionType);
41 virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, d ouble y2);
42 virtual void setStepsTimingFunction(int numberOfSteps, float stepsStartOffse t);
43
44 // blink::CompositorAnimationCurve implementation.
45 AnimationCurveType type() const override;
46
47 scoped_ptr<cc::AnimationCurve> cloneToAnimationCurve() const;
48
49 private:
50 scoped_ptr<cc::KeyframedFilterAnimationCurve> m_curve;
51 };
52
53 } // namespace blink
54
55 #endif // CompositorFilterAnimationCurve_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698