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

Side by Side Diff: webkit/compositor/WheelFlingPlatformGestureCurve.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
« no previous file with comments | « webkit/compositor/WebVideoLayerImpl.cpp ('k') | webkit/compositor/compositor.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WheelFlingPlatformGestureCurve_h
6 #define WheelFlingPlatformGestureCurve_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 mouse wheel-based fling
18 // scroll. A Rayleigh distribtution curve is used to define the velocity profile ,
19 // so velocity starts at zero, accelerates to a maximum proportional to 'velocit y',
20 // then gently tails off to zero again.
21 class WheelFlingPlatformGestureCurve : public PlatformGestureCurve {
22 public:
23 static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity);
24 virtual ~WheelFlingPlatformGestureCurve();
25
26 virtual const char* debugName() const OVERRIDE;
27 virtual bool apply(double time, PlatformGestureCurveTarget*) OVERRIDE;
28
29 private:
30 explicit WheelFlingPlatformGestureCurve(const FloatPoint& velocity);
31
32 FloatPoint m_velocity;
33 IntPoint m_cumulativeScroll;
34 };
35
36 } // namespace WebCore
37
38 #endif
OLDNEW
« no previous file with comments | « webkit/compositor/WebVideoLayerImpl.cpp ('k') | webkit/compositor/compositor.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698