Index: gm/shadows.cpp |
diff --git a/gm/shadows.cpp b/gm/shadows.cpp |
index 5696240d21ed3ca00b7603b0b8ce0ff53b6e3c85..6263af29bf6334272c281720765016379000f9f4 100644 |
--- a/gm/shadows.cpp |
+++ b/gm/shadows.cpp |
@@ -54,45 +54,36 @@ protected: |
} |
void onDraw(SkCanvas* canvas) override { |
- SkDrawLooper* shadowLoopers[5]; |
- shadowLoopers[0] = |
- SkBlurDrawLooper::Create(SK_ColorBLUE, |
+ sk_sp<SkDrawLooper> shadowLoopers[] = { |
+ SkBlurDrawLooper::Make(SK_ColorBLUE, |
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), |
SkIntToScalar(5), SkIntToScalar(10), |
SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
SkBlurDrawLooper::kOverrideColor_BlurFlag | |
- SkBlurDrawLooper::kHighQuality_BlurFlag); |
- SkAutoUnref aurL0(shadowLoopers[0]); |
- shadowLoopers[1] = |
- SkBlurDrawLooper::Create(SK_ColorBLUE, |
+ SkBlurDrawLooper::kHighQuality_BlurFlag), |
+ SkBlurDrawLooper::Make(SK_ColorBLUE, |
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), |
SkIntToScalar(5), SkIntToScalar(10), |
SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
- SkBlurDrawLooper::kOverrideColor_BlurFlag); |
- SkAutoUnref aurL1(shadowLoopers[1]); |
- shadowLoopers[2] = |
- SkBlurDrawLooper::Create(SK_ColorBLACK, |
+ SkBlurDrawLooper::kOverrideColor_BlurFlag), |
+ SkBlurDrawLooper::Make(SK_ColorBLACK, |
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)), |
SkIntToScalar(5), |
SkIntToScalar(10), |
SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
- SkBlurDrawLooper::kHighQuality_BlurFlag); |
- SkAutoUnref aurL2(shadowLoopers[2]); |
- shadowLoopers[3] = |
- SkBlurDrawLooper::Create(0x7FFF0000, |
+ SkBlurDrawLooper::kHighQuality_BlurFlag), |
+ SkBlurDrawLooper::Make(0x7FFF0000, |
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)), |
SkIntToScalar(-5), SkIntToScalar(-10), |
SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
SkBlurDrawLooper::kOverrideColor_BlurFlag | |
- SkBlurDrawLooper::kHighQuality_BlurFlag); |
- SkAutoUnref aurL3(shadowLoopers[3]); |
- shadowLoopers[4] = |
- SkBlurDrawLooper::Create(SK_ColorBLACK, SkIntToScalar(0), |
+ SkBlurDrawLooper::kHighQuality_BlurFlag), |
+ SkBlurDrawLooper::Make(SK_ColorBLACK, SkIntToScalar(0), |
SkIntToScalar(5), SkIntToScalar(5), |
SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
SkBlurDrawLooper::kOverrideColor_BlurFlag | |
- SkBlurDrawLooper::kHighQuality_BlurFlag); |
- SkAutoUnref aurL4(shadowLoopers[4]); |
+ SkBlurDrawLooper::kHighQuality_BlurFlag), |
+ }; |
static const struct { |
SkColor fColor; |