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

Side by Side Diff: include/effects/SkDashPathEffect.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/SkCornerPathEffect.h ('k') | include/effects/SkDiscretePathEffect.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 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 SkDashPathEffect_DEFINED 8 #ifndef SkDashPathEffect_DEFINED
9 #define SkDashPathEffect_DEFINED 9 #define SkDashPathEffect_DEFINED
10 10
(...skipping 18 matching lines...) Expand all
29 10 pixels on 29 10 pixels on
30 20 pixels off 30 20 pixels off
31 10 pixels on 31 10 pixels on
32 20 pixels off 32 20 pixels off
33 ... 33 ...
34 A phase of -5, 25, 55, 85, etc. would all result in the same path, 34 A phase of -5, 25, 55, 85, etc. would all result in the same path,
35 because the sum of all the intervals is 30. 35 because the sum of all the intervals is 30.
36 36
37 Note: only affects stroked paths. 37 Note: only affects stroked paths.
38 */ 38 */
39 static SkPathEffect* Create(const SkScalar intervals[], int count, SkScalar phase); 39 static sk_sp<SkPathEffect> Make(const SkScalar intervals[], int count, SkSca lar phase);
40
41 #ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR
42 static SkPathEffect* Create(const SkScalar intervals[], int count, SkScalar phase) {
43 return Make(intervals, count, phase).release();
44 }
45 #endif
40 46
41 virtual bool filterPath(SkPath* dst, const SkPath& src, 47 virtual bool filterPath(SkPath* dst, const SkPath& src,
42 SkStrokeRec*, const SkRect*) const override; 48 SkStrokeRec*, const SkRect*) const override;
43 49
44 virtual bool asPoints(PointData* results, const SkPath& src, 50 virtual bool asPoints(PointData* results, const SkPath& src,
45 const SkStrokeRec&, const SkMatrix&, 51 const SkStrokeRec&, const SkMatrix&,
46 const SkRect*) const override; 52 const SkRect*) const override;
47 53
48 DashType asADash(DashInfo* info) const override; 54 DashType asADash(DashInfo* info) const override;
49 55
(...skipping 16 matching lines...) Expand all
66 // computed from phase 72 // computed from phase
67 73
68 SkScalar fInitialDashLength; 74 SkScalar fInitialDashLength;
69 int32_t fInitialDashIndex; 75 int32_t fInitialDashIndex;
70 SkScalar fIntervalLength; 76 SkScalar fIntervalLength;
71 77
72 typedef SkPathEffect INHERITED; 78 typedef SkPathEffect INHERITED;
73 }; 79 };
74 80
75 #endif 81 #endif
OLDNEW
« no previous file with comments | « include/effects/SkCornerPathEffect.h ('k') | include/effects/SkDiscretePathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698