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

Unified Diff: include/effects/SkBlurMaskFilter.h

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 | « include/effects/SkBlurDrawLooper.h ('k') | include/effects/SkEmbossMaskFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkBlurMaskFilter.h
diff --git a/include/effects/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h
index 356475ed4c47af3fdad513ebd2fb86e0a3db3a77..3ba91774f05b459f4afec83ccf09b438456b235e 100644
--- a/include/effects/SkBlurMaskFilter.h
+++ b/include/effects/SkBlurMaskFilter.h
@@ -37,7 +37,8 @@ public:
* @param flags Flags to use - defaults to none
* @return The new blur maskfilter
*/
- static SkMaskFilter* Create(SkBlurStyle style, SkScalar sigma, uint32_t flags = kNone_BlurFlag);
+ static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma,
+ uint32_t flags = kNone_BlurFlag);
/** Create an emboss maskfilter
@param blurSigma standard deviation of the Gaussian blur to apply
@@ -47,13 +48,22 @@ public:
@param specular coefficient for specular highlights (e.g. 8)
@return the emboss maskfilter
*/
- static SkMaskFilter* CreateEmboss(SkScalar blurSigma, const SkScalar direction[3],
- SkScalar ambient, SkScalar specular);
+ static sk_sp<SkMaskFilter> MakeEmboss(SkScalar blurSigma, const SkScalar direction[3],
+ SkScalar ambient, SkScalar specular);
+#ifdef SK_SUPPORT_LEGACY_MASKFILTER_PTR
+ static SkMaskFilter* Create(SkBlurStyle style, SkScalar sigma, uint32_t flags = kNone_BlurFlag){
+ return Make(style, sigma, flags).release();
+ }
+ static SkMaskFilter* CreateEmboss(SkScalar blurSigma, const SkScalar direction[3],
+ SkScalar ambient, SkScalar specular) {
+ return MakeEmboss(blurSigma, direction, ambient, specular).release();
+ }
SK_ATTR_DEPRECATED("use sigma version")
static SkMaskFilter* CreateEmboss(const SkScalar direction[3],
SkScalar ambient, SkScalar specular,
SkScalar blurRadius);
+#endif
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
« no previous file with comments | « include/effects/SkBlurDrawLooper.h ('k') | include/effects/SkEmbossMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698