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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « samplecode/SampleEmboss.cpp ('k') | samplecode/SampleFuzz.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 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;
« no previous file with comments | « samplecode/SampleEmboss.cpp ('k') | samplecode/SampleFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698