Index: src/core/SkMatrixImageFilter.h |
diff --git a/src/core/SkMatrixImageFilter.h b/src/core/SkMatrixImageFilter.h |
index d7745668c4a9ec08f23b97be5b52da051838032a..e02541c12ece7a96e212c3f0c23aeed8519c51ff 100644 |
--- a/src/core/SkMatrixImageFilter.h |
+++ b/src/core/SkMatrixImageFilter.h |
@@ -25,19 +25,27 @@ public: |
* passed to filterImage() is used instead. |
*/ |
- static SkMatrixImageFilter* Create(const SkMatrix& transform, |
- SkFilterQuality filterQuality, |
- SkImageFilter* input = nullptr); |
+ static sk_sp<SkImageFilter> Make(const SkMatrix& transform, |
+ SkFilterQuality filterQuality, |
+ sk_sp<SkImageFilter> input); |
SkRect computeFastBounds(const SkRect&) const override; |
SK_TO_STRING_OVERRIDE() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixImageFilter) |
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
+ static SkImageFilter* Create(const SkMatrix& transform, |
+ SkFilterQuality filterQuality, |
+ SkImageFilter* input = nullptr) { |
+ return Make(transform, filterQuality, sk_ref_sp<SkImageFilter>(input)).release(); |
+ } |
+#endif |
+ |
protected: |
SkMatrixImageFilter(const SkMatrix& transform, |
SkFilterQuality, |
- SkImageFilter* input); |
+ sk_sp<SkImageFilter> input); |
void flatten(SkWriteBuffer&) const override; |
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |