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

Unified Diff: third_party/WebKit/Source/platform/animation/WebTransformAnimationCurve.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/WebTransformAnimationCurve.h
diff --git a/third_party/WebKit/public/platform/WebTransformAnimationCurve.h b/third_party/WebKit/Source/platform/animation/WebTransformAnimationCurve.h
similarity index 68%
rename from third_party/WebKit/public/platform/WebTransformAnimationCurve.h
rename to third_party/WebKit/Source/platform/animation/WebTransformAnimationCurve.h
index 4aba2820b1e235ff170ed7c0fb9e0fea1b387652..80717ce50fee5f9dc6c2737feb30daf2f9d8619b 100644
--- a/third_party/WebKit/public/platform/WebTransformAnimationCurve.h
+++ b/third_party/WebKit/Source/platform/animation/WebTransformAnimationCurve.h
@@ -25,30 +25,49 @@
#ifndef WebTransformAnimationCurve_h
#define WebTransformAnimationCurve_h
-#include "WebCommon.h"
-#include "WebCompositorAnimationCurve.h"
-#include "WebTransformKeyframe.h"
+#include "base/memory/scoped_ptr.h"
+#include "platform/PlatformExport.h"
+#include "platform/animation/WebCompositorAnimationCurve.h"
+#include "platform/animation/WebTransformKeyframe.h"
+
+namespace cc {
+class AnimationCurve;
+class KeyframedTransformAnimationCurve;
+}
+
+namespace blink {
+class WebTransformKeyframe;
+}
namespace blink {
// A keyframed transform animation curve.
-class WebTransformAnimationCurve : public WebCompositorAnimationCurve {
+class PLATFORM_EXPORT WebTransformAnimationCurve : public WebCompositorAnimationCurve {
public:
- virtual ~WebTransformAnimationCurve() { }
+ WebTransformAnimationCurve();
+ ~WebTransformAnimationCurve() override;
// Adds the keyframe with the default timing function (ease).
- virtual void add(const WebTransformKeyframe&) = 0;
- virtual void add(const WebTransformKeyframe&, TimingFunctionType) = 0;
+ virtual void add(const WebTransformKeyframe&);
+ virtual void add(const WebTransformKeyframe&, 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 WebTransformKeyframe&, double x1, double y1, double x2, double y2) = 0;
+ // assumed that x0 = y0, and x3 = y3 = 1.
+ virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2);
// Adds the keyframe with a steps timing function.
- virtual void add(const WebTransformKeyframe&, int steps, float stepsStartOffset) = 0;
+ virtual void add(const WebTransformKeyframe&, 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);
+
+ // WebCompositorAnimationCurve implementation.
+ AnimationCurveType type() const override;
+
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
- 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;
+private:
+ scoped_ptr<cc::KeyframedTransformAnimationCurve> m_curve;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698