Index: gm/imagefilters.cpp |
diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp |
index 18e353a099ef0745f2a8521fb885668e28aab086..4343f8b03c4d9bf03e229d9ed49723efcbaea1f7 100644 |
--- a/gm/imagefilters.cpp |
+++ b/gm/imagefilters.cpp |
@@ -19,7 +19,7 @@ |
* |
* see https://bug.skia.org/3741 |
*/ |
-static void do_draw(SkCanvas* canvas, SkXfermode::Mode mode, SkImageFilter* imf) { |
+static void do_draw(SkCanvas* canvas, SkXfermode::Mode mode, sk_sp<SkImageFilter> imf) { |
SkAutoCanvasRestore acr(canvas, true); |
canvas->clipRect(SkRect::MakeWH(220, 220)); |
@@ -39,7 +39,7 @@ static void do_draw(SkCanvas* canvas, SkXfermode::Mode mode, SkImageFilter* imf) |
canvas->drawOval(r0, paint); |
paint.setColor(0x660000FF); |
- paint.setImageFilter(imf); |
+ paint.setImageFilter(std::move(imf)); |
paint.setXfermodeMode(mode); |
canvas->drawOval(r1, paint); |
} |
@@ -48,8 +48,9 @@ DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) { |
canvas->translate(10, 10); |
// just need an imagefilter to trigger the code-path (which creates a tmp layer) |
- SkAutoTUnref<SkImageFilter> imf(SkImageFilter::CreateMatrixFilter(SkMatrix::I(), |
- kNone_SkFilterQuality)); |
+ sk_sp<SkImageFilter> imf(SkImageFilter::MakeMatrixFilter(SkMatrix::I(), |
+ kNone_SkFilterQuality, |
+ nullptr)); |
const SkXfermode::Mode modes[] = { |
SkXfermode::kSrcATop_Mode, SkXfermode::kDstIn_Mode |