aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefiltersstroked.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-05 15:09:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-05 15:09:00 -0700
commitae8c933ca89315c1256bcf23749b5ee5cbc0d53c (patch)
tree2a6f8810f638f8ffb5c5c905d434dee933d3f60b /gm/imagefiltersstroked.cpp
parent77304a5b76858acf9f1bbdabd1b2014c40b399ec (diff)
Update SkMatrixImageFilter to sk_sp
Diffstat (limited to 'gm/imagefiltersstroked.cpp')
-rw-r--r--gm/imagefiltersstroked.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/gm/imagefiltersstroked.cpp b/gm/imagefiltersstroked.cpp
index 81f814548c..cca87375d4 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: