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

Side by Side Diff: cc/animation/animation_curve.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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
« no previous file with comments | « cc/animation/animation.cc ('k') | cc/animation/animation_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_ 5 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_
6 #define CC_ANIMATION_ANIMATION_CURVE_H_ 6 #define CC_ANIMATION_ANIMATION_CURVE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "base/time/time.h" 10 #include "base/time/time.h"
10 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
11 #include "cc/output/filter_operations.h" 12 #include "cc/output/filter_operations.h"
12 #include "ui/gfx/transform.h" 13 #include "ui/gfx/transform.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class BoxF; 16 class BoxF;
16 } 17 }
17 18
18 namespace cc { 19 namespace cc {
19 20
20 class ColorAnimationCurve; 21 class ColorAnimationCurve;
21 class FilterAnimationCurve; 22 class FilterAnimationCurve;
22 class FloatAnimationCurve; 23 class FloatAnimationCurve;
23 class ScrollOffsetAnimationCurve; 24 class ScrollOffsetAnimationCurve;
24 class TransformAnimationCurve; 25 class TransformAnimationCurve;
25 class TransformOperations; 26 class TransformOperations;
26 27
27 // An animation curve is a function that returns a value given a time. 28 // An animation curve is a function that returns a value given a time.
28 class CC_EXPORT AnimationCurve { 29 class CC_EXPORT AnimationCurve {
29 public: 30 public:
30 enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET }; 31 enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET };
31 32
32 virtual ~AnimationCurve() {} 33 virtual ~AnimationCurve() {}
33 34
34 virtual base::TimeDelta Duration() const = 0; 35 virtual base::TimeDelta Duration() const = 0;
35 virtual CurveType Type() const = 0; 36 virtual CurveType Type() const = 0;
36 virtual scoped_ptr<AnimationCurve> Clone() const = 0; 37 virtual std::unique_ptr<AnimationCurve> Clone() const = 0;
37 38
38 const ColorAnimationCurve* ToColorAnimationCurve() const; 39 const ColorAnimationCurve* ToColorAnimationCurve() const;
39 const FloatAnimationCurve* ToFloatAnimationCurve() const; 40 const FloatAnimationCurve* ToFloatAnimationCurve() const;
40 const TransformAnimationCurve* ToTransformAnimationCurve() const; 41 const TransformAnimationCurve* ToTransformAnimationCurve() const;
41 const FilterAnimationCurve* ToFilterAnimationCurve() const; 42 const FilterAnimationCurve* ToFilterAnimationCurve() const;
42 const ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve() const; 43 const ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve() const;
43 44
44 ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve(); 45 ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve();
45 }; 46 };
46 47
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; 109 virtual FilterOperations GetValue(base::TimeDelta t) const = 0;
109 virtual bool HasFilterThatMovesPixels() const = 0; 110 virtual bool HasFilterThatMovesPixels() const = 0;
110 111
111 // Partial Animation implementation. 112 // Partial Animation implementation.
112 CurveType Type() const override; 113 CurveType Type() const override;
113 }; 114 };
114 115
115 } // namespace cc 116 } // namespace cc
116 117
117 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ 118 #endif // CC_ANIMATION_ANIMATION_CURVE_H_
OLDNEW
« no previous file with comments | « cc/animation/animation.cc ('k') | cc/animation/animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698