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

Unified Diff: include/effects/SkDashPathEffect.h

Issue 166583002: Factory methods for heap-allocated SkPathEffect and SkXfermode objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update experimental/PdfViewer Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkCornerPathEffect.h ('k') | include/effects/SkDiscretePathEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkDashPathEffect.h
diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h
index 818e0739246fa31928dddc3faa4775104afb000f..a1c548265367cd0b0eac1d963070799ac6652b5d 100644
--- a/include/effects/SkDashPathEffect.h
+++ b/include/effects/SkDashPathEffect.h
@@ -36,8 +36,10 @@ public:
Note: only affects stroked paths.
*/
- SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase,
- bool scaleToFit = false);
+ static SkDashPathEffect* Create(const SkScalar intervals[], int count,
+ SkScalar phase, bool scaleToFit = false) {
+ return SkNEW_ARGS(SkDashPathEffect, (intervals, count, phase, scaleToFit));
+ }
virtual ~SkDashPathEffect();
virtual bool filterPath(SkPath* dst, const SkPath& src,
@@ -55,6 +57,12 @@ protected:
SkDashPathEffect(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase,
+ bool scaleToFit = false);
+
private:
SkScalar* fIntervals;
int32_t fCount;
« 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