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

Unified Diff: samplecode/SampleAnimBlur.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/SampleAll.cpp ('k') | samplecode/SampleBigBlur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAnimBlur.cpp
diff --git a/samplecode/SampleAnimBlur.cpp b/samplecode/SampleAnimBlur.cpp
index 98a3560fe9e9f76ed012ca629642123b8ee5408a..5330fdfa71788585a3257ecc86d30c6f3d593078 100644
--- a/samplecode/SampleAnimBlur.cpp
+++ b/samplecode/SampleAnimBlur.cpp
@@ -46,12 +46,10 @@ protected:
SkRandom random;
for (size_t i = 0; i < SK_ARRAY_COUNT(gStyles); ++i) {
- SkMaskFilter* mf = SkBlurMaskFilter::Create(
- gStyles[i],
- fBlurSigma,
- SkBlurMaskFilter::kHighQuality_BlurFlag);
SkPaint paint;
- SkSafeUnref(paint.setMaskFilter(mf));
+ paint.setMaskFilter(SkBlurMaskFilter::Make(gStyles[i],
+ fBlurSigma,
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
paint.setColor(random.nextU() | 0xff000000);
canvas->drawCircle(200 * SK_Scalar1 + 400 * (i % 2) * SK_Scalar1,
200 * SK_Scalar1 + i / 2 * 400 * SK_Scalar1,
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleBigBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698