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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 1869833002: Update MatrixConvolutionImageFilter 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 | « include/effects/SkMatrixConvolutionImageFilter.h ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index a7f4163b27fa9fd4ed1a0346ec82d7afd1154859..f09c6a57a015c4f217f5991a768a72fbe81a5693 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -555,7 +555,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
filter = SkAlphaThresholdFilter::Make(make_region(),
make_scalar(),
make_scalar(),
- nullptr);
+ make_image_filter());
break;
case MERGE:
filter = SkMergeImageFilter::Make(make_image_filter(),
@@ -614,18 +614,16 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
}
SkIPoint kernelOffset = SkIPoint::Make(R(SkIntToScalar(size.width())),
R(SkIntToScalar(size.height())));
- sk_sp<SkImageFilter> subFilter(make_image_filter());
- filter = sk_sp<SkImageFilter>(SkMatrixConvolutionImageFilter::Create(
- size,
- kernel.begin(),
- make_scalar(),
- make_scalar(),
- kernelOffset,
- (SkMatrixConvolutionImageFilter::TileMode)R(3),
- R(2) == 1,
- subFilter.get(),
- &cropR));
+ filter = SkMatrixConvolutionImageFilter::Make(size,
+ kernel.begin(),
+ make_scalar(),
+ make_scalar(),
+ kernelOffset,
+ (SkMatrixConvolutionImageFilter::TileMode)R(3),
+ R(2) == 1,
+ make_image_filter(),
+ &cropR);
break;
}
case COMPOSE:
« no previous file with comments | « include/effects/SkMatrixConvolutionImageFilter.h ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698