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

Side by Side Diff: webkit/compositor/TouchpadFlingPlatformGestureCurve.h

Issue 10920056: Make cc_unittests and webkit_compositor_unittests executable always (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to webkit_compositor_bindings Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2012 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 TouchpadFlingPlatformGestureCurve_h
6 #define TouchpadFlingPlatformGestureCurve_h
7
8 #include "FloatPoint.h"
9 #include "PlatformGestureCurve.h"
10 #include <wtf/OwnPtr.h>
11 #include <wtf/PassOwnPtr.h>
12
13 namespace WebCore {
14
15 class PlatformGestureCurveTarget;
16
17 // Implementation of PlatformGestureCurve suitable for touch pad/screen-based
18 // fling scroll. Starts with a flat velocity profile based on 'velocity', which
19 // tails off to zero. Time is scaled to that duration of the fling is proportion al
20 // the initial velocity.
21 class TouchpadFlingPlatformGestureCurve : public PlatformGestureCurve {
22 public:
23 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, I ntPoint cumulativeScroll = IntPoint());
24 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, f loat p0, float p1, float p2, float p3, float p4, float curveDuration, IntPoint c umulativeScroll = IntPoint());
25 virtual ~TouchpadFlingPlatformGestureCurve();
26
27 virtual const char* debugName() const OVERRIDE;
28 virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*) OVERRI DE;
29
30 private:
31 TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, float p0, floa t p1, float p2, float p3, float p4, float curveDuration, const IntPoint& cumulat iveScroll);
32
33 FloatPoint m_displacementRatio;
34 IntPoint m_cumulativeScroll;
35 float m_coeffs[5];
36 float m_timeOffset;
37 float m_curveDuration;
38 float m_positionOffset;
39
40 static const int m_maxSearchIterations;
41 };
42
43 } // namespace WebCore
44
45 #endif
OLDNEW
« no previous file with comments | « webkit/compositor/TiledLayerChromiumTest.cpp ('k') | webkit/compositor/TreeSynchronizerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698