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

Unified Diff: include/effects/SkDiscretePathEffect.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 sampleapp & animator 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
Index: include/effects/SkDiscretePathEffect.h
diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h
index 60eb85274c1736967d848d9b2fa05f1c04e48760..a4ccc9b1c2931a69b1b37b5ecfeed617dfd16df8 100644
--- a/include/effects/SkDiscretePathEffect.h
+++ b/include/effects/SkDiscretePathEffect.h
@@ -20,7 +20,9 @@ public:
away from the original path by a maximum of deviation.
Note: works on filled or framed paths
*/
- SkDiscretePathEffect(SkScalar segLength, SkScalar deviation);
+ static SkDiscretePathEffect* Create(SkScalar segLength, SkScalar deviation) {
+ return SkNEW_ARGS(SkDiscretePathEffect, (segLength, deviation));
+ }
virtual bool filterPath(SkPath* dst, const SkPath& src,
SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
@@ -28,6 +30,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect)
protected:
+ SkDiscretePathEffect(SkScalar segLength, SkScalar deviation);
SkDiscretePathEffect(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698