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

Unified Diff: gm/localmatriximagefilter.cpp

Issue 1860573002: Update SkMorphology ImageFilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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/imagefilterstransformed.cpp ('k') | gm/morphology.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/localmatriximagefilter.cpp
diff --git a/gm/localmatriximagefilter.cpp b/gm/localmatriximagefilter.cpp
index baa44b9d0b13ce0b218757ca1c06ed7b4e25fa81..d5b7e3e50d8a38dc155c5c5b7f0e53f1a5e86a5d 100644
--- a/gm/localmatriximagefilter.cpp
+++ b/gm/localmatriximagefilter.cpp
@@ -28,7 +28,7 @@ static sk_sp<SkImage> make_image(SkCanvas* rootCanvas) {
return surface->makeImageSnapshot();
}
-typedef SkImageFilter* (*ImageFilterFactory)();
+typedef sk_sp<SkImageFilter> (*ImageFilterFactory)();
// +[]{...} did not work on windows (VS)
// (ImageFilterFactory)[]{...} did not work on linux (gcc)
@@ -65,10 +65,10 @@ protected:
sk_sp<SkImage> image0(make_image(canvas));
const ImageFilterFactory factories[] = {
- IFCCast([]{ return SkBlurImageFilter::Make(8, 8, nullptr).release(); }),
- IFCCast([]{ return SkDilateImageFilter::Create(8, 8); }),
- IFCCast([]{ return SkErodeImageFilter::Create(8, 8); }),
- IFCCast([]{ return SkOffsetImageFilter::Make(8, 8, nullptr).release(); }),
+ IFCCast([]{ return SkBlurImageFilter::Make(8, 8, nullptr); }),
+ IFCCast([]{ return SkDilateImageFilter::Make(8, 8, nullptr); }),
+ IFCCast([]{ return SkErodeImageFilter::Make(8, 8, nullptr); }),
+ IFCCast([]{ return SkOffsetImageFilter::Make(8, 8, nullptr); }),
};
const SkMatrix matrices[] = {
« no previous file with comments | « gm/imagefilterstransformed.cpp ('k') | gm/morphology.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698