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

Unified Diff: samplecode/SampleBigBlur.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/SampleAnimBlur.cpp ('k') | samplecode/SampleBlur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleBigBlur.cpp
diff --git a/samplecode/SampleBigBlur.cpp b/samplecode/SampleBigBlur.cpp
index 800ae24fbd624494bf44996cdccb064687946e21..cb7a419a80e647b086e73d7df192bd6de2ba1d9c 100644
--- a/samplecode/SampleBigBlur.cpp
+++ b/samplecode/SampleBigBlur.cpp
@@ -29,11 +29,10 @@ protected:
SkPaint paint;
canvas->save();
paint.setColor(SK_ColorBLUE);
- SkMaskFilter* mf = SkBlurMaskFilter::Create(
+ paint.setMaskFilter(SkBlurMaskFilter::Make(
kNormal_SkBlurStyle,
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(128)),
- SkBlurMaskFilter::kHighQuality_BlurFlag);
- paint.setMaskFilter(mf)->unref();
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
canvas->translate(200, 200);
canvas->drawCircle(100, 100, 200, paint);
canvas->restore();
« no previous file with comments | « samplecode/SampleAnimBlur.cpp ('k') | samplecode/SampleBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698