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

Unified Diff: src/effects/SkBlurMaskFilter.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 | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkEmbossMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index ec4fd939fa65f2a37beedf77c6538dd74c583479..bb6a8a5ae64452a843ab325f41359a4a307e6860 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -123,7 +123,7 @@ private:
const SkScalar SkBlurMaskFilterImpl::kMAX_BLUR_SIGMA = SkIntToScalar(128);
-SkMaskFilter* SkBlurMaskFilter::Create(SkBlurStyle style, SkScalar sigma, uint32_t flags) {
+sk_sp<SkMaskFilter> SkBlurMaskFilter::Make(SkBlurStyle style, SkScalar sigma, uint32_t flags) {
if (!SkScalarIsFinite(sigma) || sigma <= 0) {
return nullptr;
}
@@ -133,7 +133,7 @@ SkMaskFilter* SkBlurMaskFilter::Create(SkBlurStyle style, SkScalar sigma, uint32
if (flags > SkBlurMaskFilter::kAll_BlurFlag) {
return nullptr;
}
- return new SkBlurMaskFilterImpl(sigma, style, flags);
+ return sk_sp<SkMaskFilter>(new SkBlurMaskFilterImpl(sigma, style, flags));
}
///////////////////////////////////////////////////////////////////////////////
@@ -586,7 +586,7 @@ sk_sp<SkFlattenable> SkBlurMaskFilterImpl::CreateProc(SkReadBuffer& buffer) {
const unsigned style = buffer.readUInt();
const unsigned flags = buffer.readUInt();
if (style <= kLastEnum_SkBlurStyle) {
- return sk_sp<SkFlattenable>(SkBlurMaskFilter::Create((SkBlurStyle)style, sigma, flags));
+ return SkBlurMaskFilter::Make((SkBlurStyle)style, sigma, flags);
}
return nullptr;
}
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkEmbossMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698