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

Unified Diff: src/core/SkMatrixImageFilter.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 | « src/core/SkImageFilter.cpp ('k') | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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&,
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698