Index: samplecode/SampleFilterFuzz.cpp |
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp |
index 1b7d30be1de12ff32d473ce4a6e250cbf469433a..5d433b5748b22c339b6a5a2d61b3da3d61d1c0f3 100644 |
--- a/samplecode/SampleFilterFuzz.cpp |
+++ b/samplecode/SampleFilterFuzz.cpp |
@@ -705,20 +705,17 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { |
nullptr)); |
break; |
} |
- case MORPHOLOGY: { |
- sk_sp<SkImageFilter> subFilter(make_image_filter()); |
- |
+ case MORPHOLOGY: |
if (R(2) == 1) { |
- filter = sk_sp<SkImageFilter>(SkDilateImageFilter::Create(R(static_cast<float>(kBitmapSize)), |
- R(static_cast<float>(kBitmapSize)), |
- subFilter.get())); |
+ filter = SkDilateImageFilter::Make(R(static_cast<float>(kBitmapSize)), |
+ R(static_cast<float>(kBitmapSize)), |
+ make_image_filter()); |
} else { |
- filter = sk_sp<SkImageFilter>(SkErodeImageFilter::Create(R(static_cast<float>(kBitmapSize)), |
- R(static_cast<float>(kBitmapSize)), |
- subFilter.get())); |
+ filter = SkErodeImageFilter::Make(R(static_cast<float>(kBitmapSize)), |
+ R(static_cast<float>(kBitmapSize)), |
+ make_image_filter()); |
} |
break; |
- } |
case BITMAP: { |
sk_sp<SkImage> image(SkImage::MakeFromBitmap(make_bitmap())); |
if (R(2) == 1) { |