aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-07 07:34:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-07 07:34:15 -0700
commit11171f3b66ba6aba561fcaafbc51eaa354b73353 (patch)
tree020973f14f0e9325ad763b4b1af4c9b99a09424d /include/effects
parent32f7782706fbf692c613457a74d080e18e27b15a (diff)
Update MagnifierImageFilter to sk_sp
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkMagnifierImageFilter.h11
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&,