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

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

Issue 2019613002: Blink Compositor Animation: Make Animation and Curve methods non-virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix codereview issues. Add cc::TimingFunction::Type enum. Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/animation/CompositorScrollOffsetAnimationCurve.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositorTransformAnimationCurve_h 5 #ifndef CompositorTransformAnimationCurve_h
6 #define CompositorTransformAnimationCurve_h 6 #define CompositorTransformAnimationCurve_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/animation/CompositorAnimationCurve.h" 9 #include "platform/animation/CompositorAnimationCurve.h"
10 #include "platform/animation/CompositorTransformKeyframe.h" 10 #include "platform/animation/CompositorTransformKeyframe.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace blink { 22 namespace blink {
23 23
24 // A keyframed transform animation curve. 24 // A keyframed transform animation curve.
25 class PLATFORM_EXPORT CompositorTransformAnimationCurve : public CompositorAnima tionCurve { 25 class PLATFORM_EXPORT CompositorTransformAnimationCurve : public CompositorAnima tionCurve {
26 WTF_MAKE_NONCOPYABLE(CompositorTransformAnimationCurve); 26 WTF_MAKE_NONCOPYABLE(CompositorTransformAnimationCurve);
27 public: 27 public:
28 CompositorTransformAnimationCurve(); 28 CompositorTransformAnimationCurve();
29 ~CompositorTransformAnimationCurve() override; 29 ~CompositorTransformAnimationCurve() override;
30 30
31 virtual void addLinearKeyframe(const CompositorTransformKeyframe&); 31 void addLinearKeyframe(const CompositorTransformKeyframe&);
32 virtual void addCubicBezierKeyframe(const CompositorTransformKeyframe&, Cubi cBezierTimingFunction::EaseType); 32 void addCubicBezierKeyframe(const CompositorTransformKeyframe&, CubicBezierT imingFunction::EaseType);
33 // Adds the keyframe with a custom, bezier timing function. Note, it is 33 // Adds the keyframe with a custom, bezier timing function. Note, it is
34 // assumed that x0 = y0, and x3 = y3 = 1. 34 // assumed that x0 = y0, and x3 = y3 = 1.
35 virtual void addCubicBezierKeyframe(const CompositorTransformKeyframe&, doub le x1, double y1, double x2, double y2); 35 void addCubicBezierKeyframe(const CompositorTransformKeyframe&, double x1, d ouble y1, double x2, double y2);
36 virtual void addStepsKeyframe(const CompositorTransformKeyframe&, int steps, StepsTimingFunction::StepPosition); 36 void addStepsKeyframe(const CompositorTransformKeyframe&, int steps, StepsTi mingFunction::StepPosition);
37 37
38 virtual void setLinearTimingFunction(); 38 void setLinearTimingFunction();
39 virtual void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseTyp e); 39 void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseType);
40 virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, d ouble y2); 40 void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2 );
41 virtual void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction:: StepPosition); 41 void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction::StepPosi tion);
42 42
43 // CompositorAnimationCurve implementation. 43 // CompositorAnimationCurve implementation.
44 std::unique_ptr<cc::AnimationCurve> cloneToAnimationCurve() const override; 44 std::unique_ptr<cc::AnimationCurve> cloneToAnimationCurve() const override;
45 45
46 private: 46 private:
47 std::unique_ptr<cc::KeyframedTransformAnimationCurve> m_curve; 47 std::unique_ptr<cc::KeyframedTransformAnimationCurve> m_curve;
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // CompositorTransformAnimationCurve_h 52 #endif // CompositorTransformAnimationCurve_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/animation/CompositorScrollOffsetAnimationCurve.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698