Index: gm/imagefiltersstroked.cpp |
diff --git a/gm/imagefiltersstroked.cpp b/gm/imagefiltersstroked.cpp |
index 81f814548ca8dc98b6a4e37f1369a5dfedcd96f7..cca87375d41a78ecc9cea5a8d4a29dc9f808b306 100644 |
--- a/gm/imagefiltersstroked.cpp |
+++ b/gm/imagefiltersstroked.cpp |
@@ -57,12 +57,12 @@ protected: |
SkMatrix resizeMatrix; |
resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y); |
- SkImageFilter* filters[] = { |
- SkBlurImageFilter::Make(5, 5, nullptr).release(), |
- SkDropShadowImageFilter::Create(10, 10, 3, 3, SK_ColorGREEN, |
- SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), |
- SkOffsetImageFilter::Make(-16, 32, nullptr).release(), |
- SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQuality), |
+ sk_sp<SkImageFilter> filters[] = { |
+ SkBlurImageFilter::Make(5, 5, nullptr), |
+ sk_sp<SkImageFilter>(SkDropShadowImageFilter::Create(10, 10, 3, 3, SK_ColorGREEN, |
+ SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode)), |
+ SkOffsetImageFilter::Make(-16, 32, nullptr), |
+ SkImageFilter::MakeMatrixFilter(resizeMatrix, kNone_SkFilterQuality, nullptr), |
}; |
SkRect r = SkRect::MakeWH(64, 64); |
@@ -95,10 +95,6 @@ protected: |
canvas->restore(); |
canvas->translate(0, r.height()); |
} |
- |
- for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) { |
- SkSafeUnref(filters[i]); |
- } |
} |
private: |