aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageFilterTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-03-30 07:32:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-30 07:32:28 -0700
commit372177ee115d46dfb5bfb881a408e6c37ae83678 (patch)
tree674a01098b007017b989cf8d350398a0c794a345 /tests/ImageFilterTest.cpp
parent2e77ddbb5e7274a83724ceaa5680f367e54163d4 (diff)
Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp
Diffstat (limited to 'tests/ImageFilterTest.cpp')
-rw-r--r--tests/ImageFilterTest.cpp13
1 files changed, 7 insertions, 6 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));