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

Unified Diff: tests/ImageFilterTest.cpp

Issue 1847583002: Update SkMergeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to To 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/SkXfermodeImageFilter.cpp ('k') | no next file » | 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 3cf73a8a9ca3ff66fa2d703c9ca73f4fe2f2f596..910ad46d91b99b04f621e7d1b21bdf0110e605a9 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -169,11 +169,13 @@ public:
SkMatrixConvolutionImageFilter::Create(
kernelSize, kernel, gain, bias, SkIPoint::Make(1, 1),
SkMatrixConvolutionImageFilter::kRepeat_TileMode, false, input, cropRect));
- this->addFilter("merge", SkMergeImageFilter::Create(input, input, SkXfermode::kSrcOver_Mode,
- cropRect));
- this->addFilter("merge with disjoint inputs", SkMergeImageFilter::Create(
- paintFilterLeft.get(), paintFilterRight.get(),
- SkXfermode::kSrcOver_Mode, cropRect));
+ this->addFilter("merge", SkMergeImageFilter::Make(sk_ref_sp<SkImageFilter>(input),
+ sk_ref_sp<SkImageFilter>(input),
+ SkXfermode::kSrcOver_Mode,
+ cropRect).release());
+ this->addFilter("merge with disjoint inputs", SkMergeImageFilter::Make(
+ std::move(paintFilterLeft), std::move(paintFilterRight),
+ SkXfermode::kSrcOver_Mode, cropRect).release());
this->addFilter("offset",
SkOffsetImageFilter::Create(SK_Scalar1, SK_Scalar1, input, cropRect));
this->addFilter("dilate", SkDilateImageFilter::Create(3, 2, input, cropRect));
@@ -824,8 +826,8 @@ static void test_imagefilter_merge_result_size(SkImageFilter::Proxy* proxy,
greenBM.allocN32Pixels(20, 20);
greenBM.eraseColor(SK_ColorGREEN);
sk_sp<SkImage> greenImage(SkImage::MakeFromBitmap(greenBM));
- SkAutoTUnref<SkImageFilter> source(SkImageSource::Create(greenImage.get()));
- SkAutoTUnref<SkImageFilter> merge(SkMergeImageFilter::Create(source.get(), source.get()));
+ sk_sp<SkImageFilter> source(SkImageSource::Create(greenImage.get()));
+ sk_sp<SkImageFilter> merge(SkMergeImageFilter::Make(source, source));
sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 1));
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698