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

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

Issue 1817543002: Revert of switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkDashPathEffect.h ('k') | samplecode/ClockFaceView.cpp » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkDiscretePathEffect_DEFINED 8 #ifndef SkDiscretePathEffect_DEFINED
9 #define SkDiscretePathEffect_DEFINED 9 #define SkDiscretePathEffect_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 @param seedAssist This is a caller-supplied seedAssist that modifies 23 @param seedAssist This is a caller-supplied seedAssist that modifies
24 the seed value that is used to randomize the path 24 the seed value that is used to randomize the path
25 segments' endpoints. If not supplied it defaults to 0, 25 segments' endpoints. If not supplied it defaults to 0,
26 in which case filtering a path multiple times will 26 in which case filtering a path multiple times will
27 result in the same set of segments (this is useful for 27 result in the same set of segments (this is useful for
28 testing). If a caller does not want this behaviour 28 testing). If a caller does not want this behaviour
29 they can pass in a different seedAssist to get a 29 they can pass in a different seedAssist to get a
30 different set of path segments. 30 different set of path segments.
31 */ 31 */
32 static sk_sp<SkPathEffect> Make(SkScalar segLength, SkScalar dev, uint32_t s eedAssist = 0);
33
34 #ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR
35 static SkPathEffect* Create(SkScalar segLength, SkScalar deviation, uint32_t seedAssist = 0) { 32 static SkPathEffect* Create(SkScalar segLength, SkScalar deviation, uint32_t seedAssist = 0) {
36 return Make(segLength, deviation, seedAssist).release(); 33 return new SkDiscretePathEffect(segLength, deviation, seedAssist);
37 } 34 }
38 #endif
39 35
40 virtual bool filterPath(SkPath* dst, const SkPath& src, 36 virtual bool filterPath(SkPath* dst, const SkPath& src,
41 SkStrokeRec*, const SkRect*) const override; 37 SkStrokeRec*, const SkRect*) const override;
42 38
43 SK_TO_STRING_OVERRIDE() 39 SK_TO_STRING_OVERRIDE()
44 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect) 40 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect)
45 41
46 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 42 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
47 bool exposedInAndroidJavaAPI() const override { return true; } 43 bool exposedInAndroidJavaAPI() const override { return true; }
48 #endif 44 #endif
49 45
50 protected: 46 protected:
51 SkDiscretePathEffect(SkScalar segLength, 47 SkDiscretePathEffect(SkScalar segLength,
52 SkScalar deviation, 48 SkScalar deviation,
53 uint32_t seedAssist); 49 uint32_t seedAssist);
54 void flatten(SkWriteBuffer&) const override; 50 void flatten(SkWriteBuffer&) const override;
55 51
56 private: 52 private:
57 SkScalar fSegLength, fPerterb; 53 SkScalar fSegLength, fPerterb;
58 54
59 /* Caller-supplied 32 bit seed assist */ 55 /* Caller-supplied 32 bit seed assist */
60 uint32_t fSeedAssist; 56 uint32_t fSeedAssist;
61 57
62 typedef SkPathEffect INHERITED; 58 typedef SkPathEffect INHERITED;
63 }; 59 };
64 60
65 #endif 61 #endif
OLDNEW
« no previous file with comments | « include/effects/SkDashPathEffect.h ('k') | samplecode/ClockFaceView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698