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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 18806c995022c2dca151367ef16accec8490ae31..d5fbc97a17397039d60f01560a1c3674eb208dff 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -582,10 +582,9 @@ static SkImageFilter* make_image_filter(bool canBeNull) {
filter = SkDownSampleImageFilter::Create(make_scalar());
break;
case XFERMODE:
- {
- SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(make_xfermode()));
- filter = SkXfermodeImageFilter::Create(mode, make_image_filter(), make_image_filter());
- }
+ filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()),
+ make_image_filter(), make_image_filter(),
+ nullptr).release();
break;
case OFFSET:
filter = SkOffsetImageFilter::Create(make_scalar(), make_scalar(), make_image_filter());

Powered by Google App Engine
This is Rietveld 408576698