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

Unified Diff: include/effects/SkMagnifierImageFilter.h

Issue 182983003: Factory methods for heap-allocated SkImageFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments 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/SkMagnifierImageFilter.h
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index 44f0d0d6898e005ce1776c114d579b043f9e2bd0..3d4191471ffc69b34e3b239e8aeea48302458673 100644
--- a/include/effects/SkMagnifierImageFilter.h
+++ b/include/effects/SkMagnifierImageFilter.h
@@ -14,7 +14,9 @@
class SK_API SkMagnifierImageFilter : public SkImageFilter {
public:
- SkMagnifierImageFilter(SkRect srcRect, SkScalar inset);
+ static SkMagnifierImageFilter* Create(SkRect srcRect, SkScalar inset) {
reed1 2014/03/04 16:56:42 Shouldn't this be (const SkRect& srcRect, ...) ?
Stephen White 2014/03/04 18:18:00 Probably. (zork@?)
Dominik Grewe 2014/03/07 16:43:38 Done (and for constructor below).
+ return SkNEW_ARGS(SkMagnifierImageFilter, (srcRect, inset));
+ }
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
@@ -28,6 +30,11 @@ protected:
virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE;
#endif
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkMagnifierImageFilter(SkRect srcRect, SkScalar inset);
+
private:
SkRect fSrcRect;
SkScalar fInset;

Powered by Google App Engine
This is Rietveld 408576698