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

Unified Diff: samplecode/SampleEffects.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/SampleBlur.cpp ('k') | samplecode/SampleEmboss.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleEffects.cpp
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index a8f793c160ce1e51e2a62f53b163c68b2fb6a7cb..c998052fabcedd5698386297453a6e122fe2d083 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -22,18 +22,15 @@ static void paint_proc0(SkPaint*) {
}
static void paint_proc1(SkPaint* paint) {
- paint->setMaskFilter(SkBlurMaskFilter::Create(
+ paint->setMaskFilter(SkBlurMaskFilter::Make(
kNormal_SkBlurStyle,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(2))))->unref();
+ SkBlurMask::ConvertRadiusToSigma(2)));
}
static void paint_proc2(SkPaint* paint) {
SkScalar dir[3] = { 1, 1, 1};
paint->setMaskFilter(
- SkBlurMaskFilter::CreateEmboss(SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)),
- dir,
- 0.1f,
- 0.05f))->unref();
+ SkBlurMaskFilter::MakeEmboss(SkBlurMask::ConvertRadiusToSigma(1), dir, 0.1f, 0.05f));
}
static void paint_proc3(SkPaint* paint) {
« no previous file with comments | « samplecode/SampleBlur.cpp ('k') | samplecode/SampleEmboss.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698