Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: include/core/SkImageFilter.h

Issue 1858353002: Update SkMatrixImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fuzz Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698