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

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorTransformAnimationCurve.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 CompositorTransformAnimationCurve_h
6 #define CompositorTransformAnimationCurve_h
7
8 #include "base/memory/scoped_ptr.h"
9 #include "platform/PlatformExport.h"
10 #include "platform/animation/CompositorAnimationCurve.h"
11 #include "platform/animation/CompositorTransformKeyframe.h"
12 #include "wtf/Noncopyable.h"
13
14 namespace cc {
15 class AnimationCurve;
16 class KeyframedTransformAnimationCurve;
17 }
18
19 namespace blink {
20 class CompositorTransformKeyframe;
21 }
22
23 namespace blink {
24
25 // A keyframed transform animation curve.
26 class PLATFORM_EXPORT CompositorTransformAnimationCurve : public CompositorAnima tionCurve {
27 WTF_MAKE_NONCOPYABLE(CompositorTransformAnimationCurve);
28 public:
29 CompositorTransformAnimationCurve();
30 ~CompositorTransformAnimationCurve() override;
31
32 // Adds the keyframe with the default timing function (ease).
33 virtual void add(const CompositorTransformKeyframe&);
34 virtual void add(const CompositorTransformKeyframe&, TimingFunctionType);
35 // Adds the keyframe with a custom, bezier timing function. Note, it is
36 // assumed that x0 = y0, and x3 = y3 = 1.
37 virtual void add(const CompositorTransformKeyframe&, double x1, double y1, d ouble x2, double y2);
38 // Adds the keyframe with a steps timing function.
39 virtual void add(const CompositorTransformKeyframe&, int steps, float stepsS tartOffset);
40
41 virtual void setLinearTimingFunction();
42 virtual void setCubicBezierTimingFunction(TimingFunctionType);
43 virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, d ouble y2);
44 virtual void setStepsTimingFunction(int numberOfSteps, float stepsStartOffse t);
45
46 // CompositorAnimationCurve implementation.
47 AnimationCurveType type() const override;
48
49 scoped_ptr<cc::AnimationCurve> cloneToAnimationCurve() const;
50
51 private:
52 scoped_ptr<cc::KeyframedTransformAnimationCurve> m_curve;
53 };
54
55 } // namespace blink
56
57 #endif // CompositorTransformAnimationCurve_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698