diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ImageFilterTest.cpp | 13 | ||||
-rw-r--r-- | tests/PaintImageFilterTest.cpp | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index 9d2039687d..cd900e3df1 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -138,17 +138,17 @@ public: SkPaint paint; paint.setShader(shader); - SkAutoTUnref<SkImageFilter> paintFilter(SkPaintImageFilter::Create(paint)); + sk_sp<SkImageFilter> paintFilter(SkPaintImageFilter::Make(paint)); sk_sp<SkShader> greenColorShader(SkShader::MakeColorShader(SK_ColorGREEN)); SkPaint greenColorShaderPaint; greenColorShaderPaint.setShader(greenColorShader); SkImageFilter::CropRect leftSideCropRect(SkRect::MakeXYWH(0, 0, 32, 64)); - SkAutoTUnref<SkImageFilter> paintFilterLeft(SkPaintImageFilter::Create( - greenColorShaderPaint, &leftSideCropRect)); + sk_sp<SkImageFilter> paintFilterLeft(SkPaintImageFilter::Make(greenColorShaderPaint, + &leftSideCropRect)); SkImageFilter::CropRect rightSideCropRect(SkRect::MakeXYWH(32, 0, 32, 64)); - SkAutoTUnref<SkImageFilter> paintFilterRight(SkPaintImageFilter::Create( - greenColorShaderPaint, &rightSideCropRect)); + sk_sp<SkImageFilter> paintFilterRight(SkPaintImageFilter::Make(greenColorShaderPaint, + &rightSideCropRect)); this->addFilter("color filter", SkColorFilterImageFilter::Create(cf.get(), input, cropRect)); @@ -172,7 +172,8 @@ public: this->addFilter("merge", SkMergeImageFilter::Create(input, input, SkXfermode::kSrcOver_Mode, cropRect)); this->addFilter("merge with disjoint inputs", SkMergeImageFilter::Create( - paintFilterLeft, paintFilterRight, SkXfermode::kSrcOver_Mode, cropRect)); + paintFilterLeft.get(), paintFilterRight.get(), + SkXfermode::kSrcOver_Mode, cropRect)); this->addFilter("offset", SkOffsetImageFilter::Create(SK_Scalar1, SK_Scalar1, input, cropRect)); this->addFilter("dilate", SkDilateImageFilter::Create(3, 2, input, cropRect)); diff --git a/tests/PaintImageFilterTest.cpp b/tests/PaintImageFilterTest.cpp index f1c0c2eb97..03653368ab 100644 --- a/tests/PaintImageFilterTest.cpp +++ b/tests/PaintImageFilterTest.cpp @@ -38,7 +38,7 @@ static void test_unscaled(skiatest::Reporter* reporter) { { SkPaint paint; SkImageFilter::CropRect cr(r); - paint.setImageFilter(SkPaintImageFilter::Create(gradientPaint, &cr))->unref(); + paint.setImageFilter(SkPaintImageFilter::Make(gradientPaint, &cr)); canvasFilter.drawRect(r, paint); } @@ -84,7 +84,7 @@ static void test_scaled(skiatest::Reporter* reporter) { { SkPaint paint; SkImageFilter::CropRect cr(r); - paint.setImageFilter(SkPaintImageFilter::Create(gradientPaint, &cr))->unref(); + paint.setImageFilter(SkPaintImageFilter::Make(gradientPaint, &cr)); canvasFilter.scale(SkIntToScalar(2), SkIntToScalar(2)); canvasFilter.drawRect(r, paint); } |