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

Unified Diff: third_party/WebKit/Source/platform/animation/WebFloatAnimationCurve.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: Fix ScrollAnimatorCompositorCoordinator for MSVC. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/animation/WebFloatAnimationCurve.h
diff --git a/third_party/WebKit/public/platform/WebFloatAnimationCurve.h b/third_party/WebKit/Source/platform/animation/WebFloatAnimationCurve.h
similarity index 68%
rename from third_party/WebKit/public/platform/WebFloatAnimationCurve.h
rename to third_party/WebKit/Source/platform/animation/WebFloatAnimationCurve.h
index 74d9e8d278ae8e4a171388b3aa1b7ccd90f7f82e..63c55528d52054a24e053081bbb07a74e37141ea 100644
--- a/third_party/WebKit/public/platform/WebFloatAnimationCurve.h
+++ b/third_party/WebKit/Source/platform/animation/WebFloatAnimationCurve.h
@@ -25,33 +25,51 @@
#ifndef WebFloatAnimationCurve_h
#define WebFloatAnimationCurve_h
-#include "WebCompositorAnimationCurve.h"
+#include "base/memory/scoped_ptr.h"
+#include "platform/PlatformExport.h"
+#include "platform/animation/WebCompositorAnimationCurve.h"
+#include "platform/animation/WebFloatKeyframe.h"
-#include "WebCommon.h"
-#include "WebFloatKeyframe.h"
+namespace cc {
+class AnimationCurve;
+class KeyframedFloatAnimationCurve;
+}
+
+namespace blink {
+struct WebFloatKeyframe;
+}
namespace blink {
// A keyframed float animation curve.
-class WebFloatAnimationCurve : public WebCompositorAnimationCurve {
+class PLATFORM_EXPORT WebFloatAnimationCurve : public WebCompositorAnimationCurve {
public:
- virtual ~WebFloatAnimationCurve() { }
+ WebFloatAnimationCurve();
+ ~WebFloatAnimationCurve() override;
// Adds the keyframe with the default timing function (ease).
- virtual void add(const WebFloatKeyframe&) = 0;
- virtual void add(const WebFloatKeyframe&, TimingFunctionType) = 0;
+ virtual void add(const WebFloatKeyframe&);
+ virtual void add(const WebFloatKeyframe&, TimingFunctionType);
// Adds the keyframe with a custom, bezier timing function. Note, it is
- // assumed that x0 = y0 = 0, and x3 = y3 = 1.
- virtual void add(const WebFloatKeyframe&, double x1, double y1, double x2, double y2) = 0;
+ // assumed that x0 = y0 , and x3 = y3 = 1.
+ virtual void add(const WebFloatKeyframe&, double x1, double y1, double x2, double y2);
// Adds the keyframe with a steps timing function.
- virtual void add(const WebFloatKeyframe&, int steps, float stepsStartOffset) = 0;
+ virtual void add(const WebFloatKeyframe&, int steps, float stepsStartOffset);
+
+ virtual void setLinearTimingFunction();
+ virtual void setCubicBezierTimingFunction(TimingFunctionType);
+ virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2);
+ virtual void setStepsTimingFunction(int numberOfSteps, float stepsStartOffset);
+
+ virtual float getValue(double time) const;
+
+ // WebCompositorAnimationCurve implementation.
+ AnimationCurveType type() const override;
- virtual void setLinearTimingFunction() = 0;
- virtual void setCubicBezierTimingFunction(TimingFunctionType) = 0;
- virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2) = 0;
- virtual void setStepsTimingFunction(int numberOfSteps, float stepsStartOffset) = 0;
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
- virtual float getValue(double time) const = 0;
+private:
+ scoped_ptr<cc::KeyframedFloatAnimationCurve> m_curve;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698