Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Unified Diff: tests/ImageFilterTest.cpp

Issue 1842793002: Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ooops Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | tests/PaintImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 9d2039687d325397256f32ba3b0b10173dcf5481..cd900e3df1bdfe8a45a7a2a4526df6cf2e1d979e 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));
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | tests/PaintImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698