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

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: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | include/effects/SkMatrixConvolutionImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkMagnifierImageFilter.h
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index 44f0d0d6898e005ce1776c114d579b043f9e2bd0..cfe1f09b411aba757a7445850abb96a87f346347 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(const SkRect& srcRect, SkScalar inset) {
+ 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(const SkRect& srcRect, SkScalar inset);
+
private:
SkRect fSrcRect;
SkScalar fInset;
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | include/effects/SkMatrixConvolutionImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698