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

Unified Diff: samplecode/SampleStrokePath.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/SampleSlides.cpp ('k') | samplecode/SampleTextAlpha.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleStrokePath.cpp
diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp
index f3cdee33a63031a092d55243a0e585212f73c970..e69625e9bf2ba31e444131690b51328fcb70d4a9 100644
--- a/samplecode/SampleStrokePath.cpp
+++ b/samplecode/SampleStrokePath.cpp
@@ -165,12 +165,10 @@ protected:
kSolid_SkBlurStyle,
};
for (int x = 0; x < 5; x++) {
- SkMaskFilter* mf;
SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4));
for (int y = 0; y < 10; y++) {
if (x) {
- mf = SkBlurMaskFilter::Create(gStyle[x - 1], sigma);
- paint.setMaskFilter(mf)->unref();
+ paint.setMaskFilter(SkBlurMaskFilter::Make(gStyle[x - 1], sigma));
}
canvas->drawText("Title Bar", 9, x*SkIntToScalar(100), y*SkIntToScalar(30), paint);
sigma *= 0.75f;
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleTextAlpha.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698