Index: samplecode/SampleFilterFuzz.cpp |
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp |
index 6413aa103f8725f44de73f8aa62d80ed3b4fc908..1b7d30be1de12ff32d473ce4a6e250cbf469433a 100644 |
--- a/samplecode/SampleFilterFuzz.cpp |
+++ b/samplecode/SampleFilterFuzz.cpp |
@@ -461,13 +461,12 @@ static sk_sp<SkPathEffect> make_path_effect(bool canBeNull = true) { |
return pathEffect; |
} |
-static SkMaskFilter* make_mask_filter() { |
- SkMaskFilter* maskFilter; |
+static sk_sp<SkMaskFilter> make_mask_filter() { |
+ sk_sp<SkMaskFilter> maskFilter; |
switch (R(3)) { |
case 0: |
- maskFilter = SkBlurMaskFilter::Create(make_blur_style(), |
- make_scalar(), |
- make_blur_mask_filter_flag()); |
+ maskFilter = SkBlurMaskFilter::Make(make_blur_style(), make_scalar(), |
+ make_blur_mask_filter_flag()); |
case 1: { |
SkEmbossMaskFilter::Light light; |
for (int i = 0; i < 3; ++i) { |
@@ -476,12 +475,10 @@ static SkMaskFilter* make_mask_filter() { |
light.fPad = R(65536); |
light.fAmbient = R(256); |
light.fSpecular = R(256); |
- maskFilter = SkEmbossMaskFilter::Create(make_scalar(), |
- light); |
+ maskFilter = SkEmbossMaskFilter::Make(make_scalar(), light); |
} |
case 2: |
default: |
- maskFilter = nullptr; |
break; |
} |
return maskFilter; |