| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "GrMatrixConvolutionEffect.h" | 7 #include "GrMatrixConvolutionEffect.h" |
| 8 #include "glsl/GrGLSLFragmentProcessor.h" | 8 #include "glsl/GrGLSLFragmentProcessor.h" |
| 9 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 9 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
| 10 #include "glsl/GrGLSLProgramDataManager.h" | 10 #include "glsl/GrGLSLProgramDataManager.h" |
| 11 #include "glsl/GrGLSLUniformHandler.h" | 11 #include "glsl/GrGLSLUniformHandler.h" |
| 12 | 12 |
| 13 class GrGLMatrixConvolutionEffect : public GrGLSLFragmentProcessor { | 13 class GrGLMatrixConvolutionEffect : public GrGLSLFragmentProcessor { |
| 14 public: | 14 public: |
| 15 GrGLMatrixConvolutionEffect(const GrProcessor&); | 15 GrGLMatrixConvolutionEffect(const GrProcessor&); |
| 16 virtual void emitCode(EmitArgs&) override; | 16 void emitCode(EmitArgs&) override; |
| 17 | 17 |
| 18 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor
KeyBuilder*); | 18 static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessor
KeyBuilder*); |
| 19 | 19 |
| 20 protected: | 20 protected: |
| 21 void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override
; | 21 void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override
; |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; | 24 typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; |
| 25 SkISize fKernelSize; | 25 SkISize fKernelSize; |
| 26 bool fConvolveAlpha; | 26 bool fConvolveAlpha; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 return GrMatrixConvolutionEffect::Create(d->fTextures[texIdx], | 258 return GrMatrixConvolutionEffect::Create(d->fTextures[texIdx], |
| 259 bounds, | 259 bounds, |
| 260 kernelSize, | 260 kernelSize, |
| 261 kernel.get(), | 261 kernel.get(), |
| 262 gain, | 262 gain, |
| 263 bias, | 263 bias, |
| 264 kernelOffset, | 264 kernelOffset, |
| 265 tileMode, | 265 tileMode, |
| 266 convolveAlpha); | 266 convolveAlpha); |
| 267 } | 267 } |
| OLD | NEW |