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

Unified Diff: tests/PictureTest.cpp

Issue 1858813002: Update SkColorFilterImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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 | « tests/ImageFilterTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index a57a1b2fb28b04e317e391ef219f3514ea2f5732..f6ed59e81a9af0e82a2491a7c4e8cfc8918e2954 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -278,11 +278,11 @@ static void test_savelayer_extraction(skiatest::Reporter* reporter) {
// optimize away
SkScalar blueToRedMatrix[20] = { 0 };
blueToRedMatrix[2] = blueToRedMatrix[18] = SK_Scalar1;
- auto blueToRed(SkColorFilter::MakeMatrixFilterRowMajor255(blueToRedMatrix));
- SkAutoTUnref<SkImageFilter> filter(SkColorFilterImageFilter::Create(blueToRed.get()));
+ sk_sp<SkColorFilter> blueToRed(SkColorFilter::MakeMatrixFilterRowMajor255(blueToRedMatrix));
+ sk_sp<SkImageFilter> filter(SkColorFilterImageFilter::Make(std::move(blueToRed), nullptr));
SkPaint complexPaint;
- complexPaint.setImageFilter(filter);
+ complexPaint.setImageFilter(std::move(filter));
sk_sp<SkPicture> pict, child;
SkRTreeFactory bbhFactory;
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698