Index: gm/blurroundrect.cpp |
diff --git a/gm/blurroundrect.cpp b/gm/blurroundrect.cpp |
index 9135ba099f54733ac5f44f49420f4ad9e095ee76..5982d06be3a760c506c7f539855dac5d77cc32df 100644 |
--- a/gm/blurroundrect.cpp |
+++ b/gm/blurroundrect.cpp |
@@ -55,11 +55,10 @@ public: |
info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); |
info.fPostTranslate = false; |
SkPaint* paint = looperBuilder.addLayerOnTop(info); |
- SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( |
+ paint->setMaskFilter(SkBlurMaskFilter::Make( |
kNormal_SkBlurStyle, |
SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf), |
- SkBlurMaskFilter::kHighQuality_BlurFlag); |
- paint->setMaskFilter(maskFilter)->unref(); |
+ SkBlurMaskFilter::kHighQuality_BlurFlag)); |
paint->setColorFilter(SkColorFilter::MakeModeFilter( |
sk_tool_utils::color_to_565(SK_ColorLTGRAY), |
SkXfermode::kSrcIn_Mode)); |
@@ -142,13 +141,11 @@ protected: |
canvas->translate(0, (r.height() + SkIntToScalar(50)) * i); |
for (size_t j = 0; j < SK_ARRAY_COUNT(cornerRadii); ++j) { |
for (int k = 0; k <= 1; k++) { |
- SkMaskFilter* filter = SkBlurMaskFilter::Create( |
- kNormal_SkBlurStyle, |
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(blurRadii[i])), |
- SkBlurMaskFilter::kHighQuality_BlurFlag); |
SkPaint paint; |
paint.setColor(SK_ColorBLACK); |
- paint.setMaskFilter(filter)->unref(); |
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, |
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(blurRadii[i])), |
+ SkBlurMaskFilter::kHighQuality_BlurFlag)); |
bool useRadial = SkToBool(k); |
if (useRadial) { |