Index: samplecode/SampleBlur.cpp |
diff --git a/samplecode/SampleBlur.cpp b/samplecode/SampleBlur.cpp |
index b617691b6581c27a7e6c4d578fd427ae4b6f9643..7e6a32562d30f624217c1278faad634bb0e1f9b0 100644 |
--- a/samplecode/SampleBlur.cpp |
+++ b/samplecode/SampleBlur.cpp |
@@ -98,10 +98,9 @@ protected: |
paint.setColor(SK_ColorBLUE); |
for (size_t i = 0; i < SK_ARRAY_COUNT(gRecs); i++) { |
if (gRecs[i].fStyle != NONE) { |
- SkMaskFilter* mf = SkBlurMaskFilter::Create(gRecs[i].fStyle, |
+ paint.setMaskFilter(SkBlurMaskFilter::Make(gRecs[i].fStyle, |
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(20)), |
- flags); |
- paint.setMaskFilter(mf)->unref(); |
+ flags)); |
} else { |
paint.setMaskFilter(nullptr); |
} |
@@ -110,10 +109,9 @@ protected: |
} |
// draw text |
{ |
- SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, |
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4)), |
- flags); |
- paint.setMaskFilter(mf)->unref(); |
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, |
+ SkBlurMask::ConvertRadiusToSigma(4), |
+ flags)); |
SkScalar x = SkIntToScalar(70); |
SkScalar y = SkIntToScalar(400); |
paint.setColor(SK_ColorBLACK); |