Index: gm/localmatriximagefilter.cpp |
diff --git a/gm/localmatriximagefilter.cpp b/gm/localmatriximagefilter.cpp |
index d53380b85856957c2ac90232c6a6e19b186f76bf..5414fe341cc0a3a89f08d53a8a74e3370630ed62 100644 |
--- a/gm/localmatriximagefilter.cpp |
+++ b/gm/localmatriximagefilter.cpp |
@@ -49,7 +49,7 @@ protected: |
return SkISize::Make(640, 640); |
} |
- static void show_image(SkCanvas* canvas, SkImage* image, SkImageFilter* filter) { |
+ static void show_image(SkCanvas* canvas, SkImage* image, sk_sp<SkImageFilter> filter) { |
SkPaint paint; |
paint.setStyle(SkPaint::kStroke_Style); |
SkRect r = SkRect::MakeIWH(image->width(), image->height()).makeOutset(SK_ScalarHalf, |
@@ -81,14 +81,14 @@ protected: |
canvas->translate(40, 40); |
for (auto&& factory : factories) { |
- SkAutoTUnref<SkImageFilter> filter(factory()); |
+ sk_sp<SkImageFilter> filter(factory()); |
canvas->save(); |
show_image(canvas, image0.get(), filter); |
for (const auto& matrix : matrices) { |
- SkAutoTUnref<SkImageFilter> localFilter(filter->newWithLocalMatrix(matrix)); |
+ sk_sp<SkImageFilter> localFilter(filter->makeWithLocalMatrix(matrix)); |
canvas->translate(spacer, 0); |
- show_image(canvas, image0.get(), localFilter); |
+ show_image(canvas, image0.get(), std::move(localFilter)); |
} |
canvas->restore(); |
canvas->translate(0, spacer); |