Index: gm/morphology.cpp |
diff --git a/gm/morphology.cpp b/gm/morphology.cpp |
index c3326f9397ca91cd29e3f4ca325d49d2a109a19b..f60079b873f2a0c514c6dd46a74ec10eca1e7d1e 100644 |
--- a/gm/morphology.cpp |
+++ b/gm/morphology.cpp |
@@ -70,17 +70,15 @@ protected: |
for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) { |
const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : nullptr; |
if (j & 0x01) { |
- paint.setImageFilter(SkErodeImageFilter::Create( |
- samples[i].fRadiusX, |
- samples[i].fRadiusY, |
- nullptr, |
- cr))->unref(); |
+ paint.setImageFilter(SkErodeImageFilter::Make(samples[i].fRadiusX, |
+ samples[i].fRadiusY, |
+ nullptr, |
+ cr)); |
} else { |
- paint.setImageFilter(SkDilateImageFilter::Create( |
- samples[i].fRadiusX, |
- samples[i].fRadiusY, |
- nullptr, |
- cr))->unref(); |
+ paint.setImageFilter(SkDilateImageFilter::Make(samples[i].fRadiusX, |
+ samples[i].fRadiusY, |
+ nullptr, |
+ cr)); |
} |
this->drawClippedBitmap(canvas, paint, i * 140, j * 140); |
} |