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

Unified Diff: samplecode/SampleFilterFuzz.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 | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 5d433b5748b22c339b6a5a2d61b3da3d61d1c0f3..2be6c318891c4239673e8621a01749770660fad0 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -564,19 +564,15 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
break;
case COLOR: {
sk_sp<SkColorFilter> cf(make_color_filter());
- sk_sp<SkImageFilter> subFilter(make_image_filter());
- filter = cf ? sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get(),
- subFilter.get()))
+ filter = cf ? SkColorFilterImageFilter::Make(std::move(cf), make_image_filter())
: nullptr;
break;
}
case LUT3D: {
int cubeDimension;
sk_sp<SkData> lut3D(make_3Dlut(&cubeDimension, (R(2) == 1), (R(2) == 1), (R(2) == 1)));
- sk_sp<SkColorFilter> cf(SkColorCubeFilter::Make(lut3D, cubeDimension));
- sk_sp<SkImageFilter> subFilter(make_image_filter());
- filter = cf ? sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get(),
- subFilter.get()))
+ sk_sp<SkColorFilter> cf(SkColorCubeFilter::Make(std::move(lut3D), cubeDimension));
+ filter = cf ? SkColorFilterImageFilter::Make(std::move(cf), make_image_filter())
: nullptr;
break;
}
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698