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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 1861843002: Update DropShadowImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues 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/SkDropShadowImageFilter.h ('k') | src/effects/SkDropShadowImageFilter.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 685ad90da6a4e1366523d316c5240492ded0f7e7..8f83c3e465b59f718ee33973f9e506f129cafc3b 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -683,19 +683,16 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
filter = SkPaintImageFilter::Make(paint, &cropR);
break;
}
- case DROP_SHADOW: {
- sk_sp<SkImageFilter> subFilter(make_image_filter());
-
- filter = sk_sp<SkImageFilter>(SkDropShadowImageFilter::Create(make_scalar(),
- make_scalar(),
- make_scalar(true),
- make_scalar(true),
- make_color(),
- make_shadow_mode(),
- subFilter.get(),
- nullptr));
+ case DROP_SHADOW:
+ filter = SkDropShadowImageFilter::Make(make_scalar(),
+ make_scalar(),
+ make_scalar(true),
+ make_scalar(true),
+ make_color(),
+ make_shadow_mode(),
+ make_image_filter(),
+ nullptr);
break;
- }
case MORPHOLOGY:
if (R(2) == 1) {
filter = SkDilateImageFilter::Make(R(static_cast<float>(kBitmapSize)),
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698