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

Unified Diff: include/effects/SkBlurMaskFilter.h

Issue 253833002: move common blur types into central header (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 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/core/SkBlurTypes.h ('k') | samplecode/SampleAll.cpp » ('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 9b352dc1e45b5d6a0c4ff1812290a2700680e763..ddb163e58ab6667cc525b7b60718d35f5218e093 100644
--- a/include/effects/SkBlurMaskFilter.h
+++ b/include/effects/SkBlurMaskFilter.h
@@ -11,17 +11,20 @@
// we include this since our callers will need to at least be able to ref/unref
#include "SkMaskFilter.h"
#include "SkScalar.h"
+#include "SkBlurTypes.h"
class SK_API SkBlurMaskFilter {
public:
+#ifdef SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE
enum BlurStyle {
- kNormal_BlurStyle, //!< fuzzy inside and outside
- kSolid_BlurStyle, //!< solid inside, fuzzy outside
- kOuter_BlurStyle, //!< nothing inside, fuzzy outside
- kInner_BlurStyle, //!< fuzzy inside, nothing outside
+ kNormal_BlurStyle = kNormal_SkBlurStyle, //!< fuzzy inside and outside
+ kSolid_BlurStyle = kSolid_SkBlurStyle, //!< solid inside, fuzzy outside
+ kOuter_BlurStyle = kOuter_SkBlurStyle, //!< nothing inside, fuzzy outside
+ kInner_BlurStyle = kInner_SkBlurStyle, //!< fuzzy inside, nothing outside
kBlurStyleCount
};
+#endif
enum BlurFlags {
kNone_BlurFlag = 0x00,
@@ -33,6 +36,7 @@ public:
kAll_BlurFlag = 0x03
};
+#ifdef SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE
SK_ATTR_DEPRECATED("use sigma version")
static SkMaskFilter* Create(SkScalar radius, BlurStyle style,
uint32_t flags = kNone_BlurFlag);
@@ -45,6 +49,15 @@ public:
*/
static SkMaskFilter* Create(BlurStyle style, SkScalar sigma,
uint32_t flags = kNone_BlurFlag);
+#endif
+
+ /** Create a blur maskfilter.
+ * @param style The SkBlurStyle to use
+ * @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
+ * @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);
/** Create an emboss maskfilter
@param blurSigma standard deviation of the Gaussian blur to apply
« no previous file with comments | « include/core/SkBlurTypes.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698