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

Unified Diff: samplecode/SampleXfermodesBlur.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/SampleTextureDomain.cpp ('k') | src/animator/SkDrawBlur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleXfermodesBlur.cpp
diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp
index cab13391ed0468d6ef1a40eb37e48a5e378ce362..af75f89388ba5fc937fad85ca056c997d9546830 100644
--- a/samplecode/SampleXfermodesBlur.cpp
+++ b/samplecode/SampleXfermodesBlur.cpp
@@ -42,10 +42,9 @@ class XfermodesBlurView : public SampleView {
void draw_mode(SkCanvas* canvas, sk_sp<SkXfermode> mode, int alpha,
SkScalar x, SkScalar y) {
SkPaint p;
- SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
- SkBlurMaskFilter::kNone_BlurFlag);
- p.setMaskFilter(mf)->unref();
+ p.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(5),
+ SkBlurMaskFilter::kNone_BlurFlag));
SkScalar ww = SkIntToScalar(W);
SkScalar hh = SkIntToScalar(H);
« no previous file with comments | « samplecode/SampleTextureDomain.cpp ('k') | src/animator/SkDrawBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698