| Index: include/effects/SkMatrixConvolutionImageFilter.h
|
| diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h
|
| index 59af83e025275ed29b934fa624151481602f784a..524d05d9cabe113648313f1e978c9e8234aba0b4 100644
|
| --- a/include/effects/SkMatrixConvolutionImageFilter.h
|
| +++ b/include/effects/SkMatrixConvolutionImageFilter.h
|
| @@ -28,38 +28,42 @@ 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
|
| - elements, in row order.
|
| - @param gain A scale factor applied to each pixel after
|
| - convolution. This can be used to normalize the
|
| - kernel, if it does not sum to 1.
|
| - @param bias A bias factor added to each pixel after convolution.
|
| - @param target An offset applied to each pixel coordinate before
|
| - convolution. This can be used to center the kernel
|
| - over the image (e.g., a 3x3 kernel should have a
|
| - target of {1, 1}).
|
| - @param tileMode How accesses outside the image are treated. (@see
|
| - TileMode).
|
| + @param kernelSize The kernel size in pixels, in each dimension (N by M).
|
| + @param kernel The image processing kernel. Must contain N * M
|
| + elements, in row order.
|
| + @param gain A scale factor applied to each pixel after
|
| + convolution. This can be used to normalize the
|
| + kernel, if it does not sum to 1.
|
| + @param bias A bias factor added to each pixel after convolution.
|
| + @param kernelOffset An offset applied to each pixel coordinate before
|
| + convolution. This can be used to center the kernel
|
| + over the image (e.g., a 3x3 kernel should have an
|
| + offset of {1, 1}).
|
| + @param tileMode How accesses outside the image are treated. (@see
|
| + TileMode).
|
| @param convolveAlpha If true, all channels are convolved. If false,
|
| - only the RGB channels are convolved, and
|
| - alpha is copied from the source image.
|
| - @param input The input image filter. If NULL, the src bitmap
|
| - passed to filterImage() is used instead.
|
| - @param cropRect The rectangle to which the output processing will be limited.
|
| + only the RGB channels are convolved, and
|
| + alpha is copied from the source image.
|
| + @param input The input image filter. If NULL, the src bitmap
|
| + 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& kernelOffset,
|
| + TileMode tileMode,
|
| + bool convolveAlpha,
|
| + SkImageFilter* input = NULL,
|
| + const CropRect* cropRect = NULL) {
|
| + return SkNEW_ARGS(SkMatrixConvolutionImageFilter, (kernelSize, kernel, gain, bias,
|
| + kernelOffset, tileMode, convolveAlpha,
|
| + input, cropRect));
|
| + }
|
|
|
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImageFilter)
|
|
|
| @@ -77,12 +81,25 @@ 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& kernelOffset,
|
| + TileMode tileMode,
|
| + bool convolveAlpha,
|
| + SkImageFilter* input = NULL,
|
| + const CropRect* cropRect = NULL);
|
| +
|
| private:
|
| SkISize fKernelSize;
|
| SkScalar* fKernel;
|
| SkScalar fGain;
|
| SkScalar fBias;
|
| - SkIPoint fTarget;
|
| + SkIPoint fKernelOffset;
|
| TileMode fTileMode;
|
| bool fConvolveAlpha;
|
| typedef SkImageFilter INHERITED;
|
|
|