diff options
author | robertphillips <robertphillips@google.com> | 2016-04-07 07:34:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-07 07:34:15 -0700 |
commit | 11171f3b66ba6aba561fcaafbc51eaa354b73353 (patch) | |
tree | 020973f14f0e9325ad763b4b1af4c9b99a09424d /include/effects | |
parent | 32f7782706fbf692c613457a74d080e18e27b15a (diff) |
Update MagnifierImageFilter to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1864843002
Review URL: https://codereview.chromium.org/1864843002
Diffstat (limited to 'include/effects')
-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&, |