Index: include/core/SkImageFilter.h |
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h |
index 4493d282dd0536fac3e80ff4513eac14d98d039c..8a8e512254f2e42e8515fee9844b18898416f319 100644 |
--- a/include/core/SkImageFilter.h |
+++ b/include/core/SkImageFilter.h |
@@ -270,9 +270,17 @@ public: |
/** |
* Create an SkMatrixImageFilter, which transforms its input by the given matrix. |
*/ |
+ static sk_sp<SkImageFilter> MakeMatrixFilter(const SkMatrix& matrix, |
+ SkFilterQuality, |
+ sk_sp<SkImageFilter> input); |
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix, |
- SkFilterQuality, |
- SkImageFilter* input = NULL); |
+ SkFilterQuality filterQuality, |
+ SkImageFilter* input = nullptr) { |
+ return MakeMatrixFilter(matrix, filterQuality, sk_ref_sp<SkImageFilter>(input)).release(); |
+ } |
+#endif |
+ |
sk_sp<SkSpecialImage> filterInput(int index, |
SkSpecialImage* src, |