diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/effects/SkMagnifierImageFilter.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h index bea03adab3..739f1eec73 100644 --- a/include/effects/SkMagnifierImageFilter.h +++ b/include/effects/SkMagnifierImageFilter.h @@ -14,13 +14,20 @@ class SK_API SkMagnifierImageFilter : public SkImageFilter { public: - static SkImageFilter* Create(const SkRect& src, SkScalar inset, SkImageFilter* input = NULL); + static sk_sp<SkImageFilter> Make(const SkRect& src, SkScalar inset, sk_sp<SkImageFilter> input); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) +#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR + static SkImageFilter* Create(const SkRect& src, SkScalar inset, + SkImageFilter* input = nullptr) { + return Make(src, inset, sk_ref_sp<SkImageFilter>(input)).release(); + } +#endif + protected: - SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input); + SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input); void flatten(SkWriteBuffer&) const override; bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, |