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

Side by Side Diff: include/effects/SkArcToPathEffect.h

Issue 1813553005: switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try to fix xpsdevice Created 4 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 unified diff | Download patch
« no previous file with comments | « include/effects/Sk2DPathEffect.h ('k') | include/effects/SkCornerPathEffect.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 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkArcToPathEffect_DEFINED 8 #ifndef SkArcToPathEffect_DEFINED
9 #define SkArcToPathEffect_DEFINED 9 #define SkArcToPathEffect_DEFINED
10 10
11 #include "SkPathEffect.h" 11 #include "SkPathEffect.h"
12 12
13 class SK_API SkArcToPathEffect : public SkPathEffect { 13 class SK_API SkArcToPathEffect : public SkPathEffect {
14 public: 14 public:
15 /** radius must be > 0 to have an effect. It specifies the distance from eac h corner 15 /** radius must be > 0 to have an effect. It specifies the distance from eac h corner
16 that should be "rounded". 16 that should be "rounded".
17 */ 17 */
18 static SkPathEffect* Create(SkScalar radius) { 18 static sk_sp<SkPathEffect> Make(SkScalar radius) {
19 if (radius <= 0) { 19 if (radius <= 0) {
20 return NULL; 20 return NULL;
21 } 21 }
22 return new SkArcToPathEffect(radius); 22 return sk_sp<SkPathEffect>(new SkArcToPathEffect(radius));
23 } 23 }
24 24
25 bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override; 25 bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override;
26 26
27 SK_TO_STRING_OVERRIDE() 27 SK_TO_STRING_OVERRIDE()
28 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArcToPathEffect) 28 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArcToPathEffect)
29 29
30 protected: 30 protected:
31 explicit SkArcToPathEffect(SkScalar radius); 31 explicit SkArcToPathEffect(SkScalar radius);
32 void flatten(SkWriteBuffer&) const override; 32 void flatten(SkWriteBuffer&) const override;
33 33
34 private: 34 private:
35 SkScalar fRadius; 35 SkScalar fRadius;
36 36
37 typedef SkPathEffect INHERITED; 37 typedef SkPathEffect INHERITED;
38 }; 38 };
39 39
40 #endif 40 #endif
OLDNEW
« no previous file with comments | « include/effects/Sk2DPathEffect.h ('k') | include/effects/SkCornerPathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698