diff options
author | Robert Phillips <robertphillips@google.com> | 2017-01-30 12:26:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-30 18:09:23 +0000 |
commit | 08c5ec71303aa58d6f081914f3e868fa5cce9f4c (patch) | |
tree | 23f08081b94430015e141d4110261648ab566f83 /src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h | |
parent | 861bc3f45d3623e802d98d09c54ba635c64fc716 (diff) |
Make blur utils take GrTextureProxies - take 2
This is a re-land of https://skia-review.googlesource.com/c/7738/ (Make blur utils take GrTextureProxies) with a fix for the Nexus7
Change-Id: I5821a26b1e986daa11d960ae826a1207512cd2a0
Reviewed-on: https://skia-review.googlesource.com/7746
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h')
-rw-r--r-- | src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h index b4f5cb7921..0bb9c5e1df 100644 --- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h +++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h @@ -24,7 +24,7 @@ public: int halfWidth, float gaussianSigma, bool useBounds, - float* bounds) { + int* bounds) { return sk_sp<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor( tex, dir, halfWidth, gaussianSigma, useBounds, bounds)); } @@ -35,7 +35,7 @@ public: int halfWidth, float gaussianSigma, bool useBounds, - float* bounds) { + int* bounds) { return sk_sp<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor( context, std::move(proxy), dir, halfWidth, gaussianSigma, useBounds, bounds)); } @@ -44,7 +44,7 @@ public: const float* kernel() const { return fKernel; } - const float* bounds() const { return fBounds; } + const int* bounds() const { return fBounds; } bool useBounds() const { return fUseBounds; } const char* name() const override { return "GaussianConvolution"; } @@ -61,11 +61,11 @@ public: private: /// Convolve with a Gaussian kernel GrGaussianConvolutionFragmentProcessor(GrTexture*, Direction, int halfWidth, - float gaussianSigma, bool useBounds, float bounds[2]); + float gaussianSigma, bool useBounds, int bounds[2]); GrGaussianConvolutionFragmentProcessor(GrContext*, sk_sp<GrTextureProxy>, Direction, int halfWidth, float gaussianSigma, bool useBounds, - float bounds[2]); + int bounds[2]); GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; @@ -85,7 +85,7 @@ private: // some of the logic from SkGpuBlurUtils into this class related to radius/sigma calculations. float fKernel[kMaxKernelWidth]; bool fUseBounds; - float fBounds[2]; + int fBounds[2]; typedef Gr1DKernelEffect INHERITED; }; |