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

Unified Diff: samplecode/SampleBlur.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/SampleBigBlur.cpp ('k') | samplecode/SampleEffects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleBlur.cpp
diff --git a/samplecode/SampleBlur.cpp b/samplecode/SampleBlur.cpp
index b617691b6581c27a7e6c4d578fd427ae4b6f9643..7e6a32562d30f624217c1278faad634bb0e1f9b0 100644
--- a/samplecode/SampleBlur.cpp
+++ b/samplecode/SampleBlur.cpp
@@ -98,10 +98,9 @@ protected:
paint.setColor(SK_ColorBLUE);
for (size_t i = 0; i < SK_ARRAY_COUNT(gRecs); i++) {
if (gRecs[i].fStyle != NONE) {
- SkMaskFilter* mf = SkBlurMaskFilter::Create(gRecs[i].fStyle,
+ paint.setMaskFilter(SkBlurMaskFilter::Make(gRecs[i].fStyle,
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(20)),
- flags);
- paint.setMaskFilter(mf)->unref();
+ flags));
} else {
paint.setMaskFilter(nullptr);
}
@@ -110,10 +109,9 @@ protected:
}
// draw text
{
- SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4)),
- flags);
- paint.setMaskFilter(mf)->unref();
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(4),
+ flags));
SkScalar x = SkIntToScalar(70);
SkScalar y = SkIntToScalar(400);
paint.setColor(SK_ColorBLACK);
« no previous file with comments | « samplecode/SampleBigBlur.cpp ('k') | samplecode/SampleEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698