Index: gm/blurroundrect.cpp |
diff --git a/gm/blurroundrect.cpp b/gm/blurroundrect.cpp |
index 6c3903fd4070f03c2ae7fdbc4c89363bdc392e2e..f688380f0e0253e6b96d6ca406c5fcd150d89c6d 100644 |
--- a/gm/blurroundrect.cpp |
+++ b/gm/blurroundrect.cpp |
@@ -53,7 +53,7 @@ public: |
} |
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
- SkLayerDrawLooper* looper = new SkLayerDrawLooper; |
+ SkLayerDrawLooper::Builder looperBuilder; |
{ |
SkLayerDrawLooper::LayerInfo info; |
info.fPaintBits = SkLayerDrawLooper::kMaskFilter_Bit |
@@ -61,7 +61,7 @@ public: |
info.fColorMode = SkXfermode::kSrc_Mode; |
info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); |
info.fPostTranslate = false; |
- SkPaint* paint = looper->addLayerOnTop(info); |
+ SkPaint* paint = looperBuilder.addLayerOnTop(info); |
SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( |
SkBlurMaskFilter::kNormal_BlurStyle, |
SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf), |
@@ -74,12 +74,12 @@ public: |
} |
{ |
SkLayerDrawLooper::LayerInfo info; |
- looper->addLayerOnTop(info); |
+ looperBuilder.addLayerOnTop(info); |
} |
SkPaint paint; |
canvas->drawRect(fRRect.rect(), paint); |
- paint.setLooper(looper)->unref(); |
+ paint.setLooper(looperBuilder.detachLooper())->unref(); |
paint.setColor(SK_ColorCYAN); |
paint.setAntiAlias(true); |