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

Unified Diff: Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h

Issue 9969140: Merge 113095 - [chromium] Switch touchpad fling curve physics to absolute (not scaled) curve. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h
===================================================================
--- Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h (revision 113130)
+++ Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h (working copy)
@@ -27,7 +27,6 @@
#include "FloatPoint.h"
#include "PlatformGestureCurve.h"
-#include "UnitBezier.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -42,19 +41,23 @@
class TouchpadFlingPlatformGestureCurve : public PlatformGestureCurve {
public:
static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, IntPoint cumulativeScroll = IntPoint());
- static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2, IntPoint cumulativeScroll = IntPoint());
+ static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, float p0, float p1, float p2, float p3, float p4, float curveDuration, IntPoint cumulativeScroll = IntPoint());
virtual ~TouchpadFlingPlatformGestureCurve();
virtual const char* debugName() const { return "TouchpadFling"; }
virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*);
private:
- TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2, const IntPoint& cumulativeScroll);
+ TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, float p0, float p1, float p2, float p3, float p4, float curveDuration, const IntPoint& cumulativeScroll);
- FloatPoint m_velocity;
- float m_timeScaleFactor;
+ FloatPoint m_displacementRatio;
IntPoint m_cumulativeScroll;
- UnitBezier m_flingBezier;
+ float m_coeffs[5];
+ float m_timeOffset;
+ float m_curveDuration;
+ float m_positionOffset;
+
+ static const int m_maxSearchIterations;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698