| Index: src/gpu/effects/GrConvolutionEffect.h
|
| diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
|
| index c353542d030a05f1c48635739841b4c2abcbba6c..87842557d6b0f947d9fe55a0c6d58ce3ee8bf00c 100644
|
| --- a/src/gpu/effects/GrConvolutionEffect.h
|
| +++ b/src/gpu/effects/GrConvolutionEffect.h
|
| @@ -42,6 +42,28 @@ public:
|
| new GrConvolutionEffect(tex, dir, halfWidth, gaussianSigma, useBounds, bounds));
|
| }
|
|
|
| + /// Convolve with an arbitrary user-specified kernel
|
| + static sk_sp<GrFragmentProcessor> Make(GrTextureProxy* tex,
|
| + Direction dir,
|
| + int halfWidth,
|
| + const float* kernel,
|
| + bool useBounds,
|
| + float bounds[2]) {
|
| + return sk_sp<GrFragmentProcessor>(
|
| + new GrConvolutionEffect(tex, dir, halfWidth, kernel, useBounds, bounds));
|
| + }
|
| +
|
| + /// Convolve with a Gaussian kernel
|
| + static sk_sp<GrFragmentProcessor> MakeGaussian(GrTextureProxy* tex,
|
| + Direction dir,
|
| + int halfWidth,
|
| + float gaussianSigma,
|
| + bool useBounds,
|
| + float bounds[2]) {
|
| + return sk_sp<GrFragmentProcessor>(
|
| + new GrConvolutionEffect(tex, dir, halfWidth, gaussianSigma, useBounds, bounds));
|
| + }
|
| +
|
| virtual ~GrConvolutionEffect();
|
|
|
| const float* kernel() const { return fKernel; }
|
| @@ -82,6 +104,19 @@ private:
|
| bool useBounds,
|
| float bounds[2]);
|
|
|
| + GrConvolutionEffect(GrTextureProxy*, Direction,
|
| + int halfWidth,
|
| + const float* kernel,
|
| + bool useBounds,
|
| + float bounds[2]);
|
| +
|
| + /// Convolve with a Gaussian kernel
|
| + GrConvolutionEffect(GrTextureProxy*, Direction,
|
| + int halfWidth,
|
| + float gaussianSigma,
|
| + bool useBounds,
|
| + float bounds[2]);
|
| +
|
| GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
|
|
|
| void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
|
|
|