Index: include/effects/SkMatrixConvolutionImageFilter.h |
diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h |
index 59af83e025275ed29b934fa624151481602f784a..7344420848e0b9fee3fc64f04fb77474b0dfcbfc 100644 |
--- a/include/effects/SkMatrixConvolutionImageFilter.h |
+++ b/include/effects/SkMatrixConvolutionImageFilter.h |
@@ -28,6 +28,8 @@ public: |
kClampToBlack_TileMode, /*!< Fill with transparent black. */ |
}; |
+ virtual ~SkMatrixConvolutionImageFilter(); |
+ |
/** Construct a matrix convolution image filter. |
@param kernelSize The kernel size in pixels, in each dimension (N by M). |
@param kernel The image processing kernel. Must contain N * M |
@@ -49,17 +51,19 @@ public: |
passed to filterImage() is used instead. |
@param cropRect The rectangle to which the output processing will be limited. |
*/ |
- |
- SkMatrixConvolutionImageFilter(const SkISize& kernelSize, |
- const SkScalar* kernel, |
- SkScalar gain, |
- SkScalar bias, |
- const SkIPoint& target, |
- TileMode tileMode, |
- bool convolveAlpha, |
- SkImageFilter* input = NULL, |
- const CropRect* cropRect = NULL); |
- virtual ~SkMatrixConvolutionImageFilter(); |
+ static SkMatrixConvolutionImageFilter* Create(const SkISize& kernelSize, |
+ const SkScalar* kernel, |
+ SkScalar gain, |
+ SkScalar bias, |
+ const SkIPoint& target, |
reed1
2014/03/04 16:56:42
Nit: Seems funny to separate kernelSize and kernal
Stephen White
2014/03/04 18:18:00
I think that was just the order they appeared in t
Dominik Grewe
2014/03/07 16:43:38
There didn't seem to be a clear consensus here so
|
+ TileMode tileMode, |
+ bool convolveAlpha, |
+ SkImageFilter* input = NULL, |
+ const CropRect* cropRect = NULL) { |
+ return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, gain, bias, |
+ target, tileMode, convolveAlpha, |
+ input, cropRect)); |
+ } |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImageFilter) |
@@ -77,6 +81,19 @@ protected: |
const SkIRect& bounds) const SK_OVERRIDE; |
#endif |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ SkMatrixConvolutionImageFilter(const SkISize& kernelSize, |
+ const SkScalar* kernel, |
+ SkScalar gain, |
+ SkScalar bias, |
+ const SkIPoint& target, |
+ TileMode tileMode, |
+ bool convolveAlpha, |
+ SkImageFilter* input = NULL, |
+ const CropRect* cropRect = NULL); |
+ |
private: |
SkISize fKernelSize; |
SkScalar* fKernel; |