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

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorScrollOffsetAnimationCurve.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: Rebase. Fix copyrights and years. Created 4 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2016 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 CompositorScrollOffsetAnimationCurve_h
6 #define CompositorScrollOffsetAnimationCurve_h
7
8 #include "base/memory/scoped_ptr.h"
9 #include "platform/PlatformExport.h"
10 #include "platform/animation/CompositorAnimationCurve.h"
11 #include "platform/geometry/FloatPoint.h"
12 #include "wtf/Noncopyable.h"
13
14 namespace cc {
15 class AnimationCurve;
16 class ScrollOffsetAnimationCurve;
17 }
18
19 namespace blink {
20
21 class PLATFORM_EXPORT CompositorScrollOffsetAnimationCurve : public CompositorAn imationCurve {
22 WTF_MAKE_NONCOPYABLE(CompositorScrollOffsetAnimationCurve);
23 public:
24 enum ScrollDurationBehavior {
25 ScrollDurationDeltaBased = 0,
26 ScrollDurationConstant,
27 ScrollDurationInverseDelta
28 };
29
30 CompositorScrollOffsetAnimationCurve(FloatPoint, TimingFunctionType, ScrollD urationBehavior);
31 ~CompositorScrollOffsetAnimationCurve() override;
32
33 // CompositorAnimationCurve implementation.
34 AnimationCurveType type() const override;
35
36 virtual void setInitialValue(FloatPoint);
37 virtual FloatPoint getValue(double time) const;
38 virtual double duration() const;
39 virtual FloatPoint targetValue() const;
40 virtual void updateTarget(double time, FloatPoint newTarget);
41
42 scoped_ptr<cc::AnimationCurve> cloneToAnimationCurve() const;
43
44 private:
45 scoped_ptr<cc::ScrollOffsetAnimationCurve> m_curve;
46 };
47
48 } // namespace blink
49
50 #endif // CompositorScrollOffsetAnimationCurve_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698