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

Unified Diff: include/effects/SkCornerPathEffect.h

Issue 166583002: Factory methods for heap-allocated SkPathEffect and SkXfermode objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move comments from constructors to factory methods. 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/SkCornerPathEffect.h
diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h
index dcb7c9f736c34c571cdf30e0e6b56b536ee22125..c77505be3911512f9478e52e54ea83a70f9f0762 100644
--- a/include/effects/SkCornerPathEffect.h
+++ b/include/effects/SkCornerPathEffect.h
@@ -20,7 +20,9 @@ public:
/** radius must be > 0 to have an effect. It specifies the distance from each corner
that should be "rounded".
*/
- SkCornerPathEffect(SkScalar radius);
+ static SkCornerPathEffect* Create(SkScalar radius) {
+ return SkNEW_ARGS(SkCornerPathEffect, (radius));
+ }
virtual ~SkCornerPathEffect();
virtual bool filterPath(SkPath* dst, const SkPath& src,
@@ -32,6 +34,11 @@ protected:
SkCornerPathEffect(SkReadBuffer&);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkCornerPathEffect(SkScalar radius);
+
private:
SkScalar fRadius;

Powered by Google App Engine
This is Rietveld 408576698