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 "gl/GrGLProcessor.h" | 8 #include "gl/GrGLProcessor.h" |
9 #include "gl/GrGLSL.h" | 9 #include "gl/GrGLSL.h" |
10 #include "gl/GrGLTexture.h" | 10 #include "gl/GrGLTexture.h" |
11 #include "gl/builders/GrGLProgramBuilder.h" | 11 #include "gl/builders/GrGLProgramBuilder.h" |
12 | 12 |
13 class GrGLMatrixConvolutionEffect : public GrGLFragmentProcessor { | 13 class GrGLMatrixConvolutionEffect : public GrGLFragmentProcessor { |
14 public: | 14 public: |
15 GrGLMatrixConvolutionEffect(const GrProcessor&); | 15 GrGLMatrixConvolutionEffect(const GrProcessor&); |
16 virtual void emitCode(GrGLFPBuilder*, | 16 virtual void emitCode(GrGLFPBuilder*, |
17 const GrFragmentProcessor&, | 17 const GrFragmentProcessor&, |
18 const char* outputColor, | 18 const char* outputColor, |
19 const char* inputColor, | 19 const char* inputColor, |
20 const TransformedCoordsArray&, | 20 const TransformedCoordsArray&, |
21 const TextureSamplerArray&) SK_OVERRIDE; | 21 const TextureSamplerArray&) override; |
22 | 22 |
23 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKe
yBuilder*); | 23 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKe
yBuilder*); |
24 | 24 |
25 void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; | 25 void setData(const GrGLProgramDataManager&, const GrProcessor&) override; |
26 | 26 |
27 private: | 27 private: |
28 typedef GrGLProgramDataManager::UniformHandle UniformHandle; | 28 typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
29 SkISize fKernelSize; | 29 SkISize fKernelSize; |
30 bool fConvolveAlpha; | 30 bool fConvolveAlpha; |
31 | 31 |
32 UniformHandle fKernelUni; | 32 UniformHandle fKernelUni; |
33 UniformHandle fImageIncrementUni; | 33 UniformHandle fImageIncrementUni; |
34 UniformHandle fKernelOffsetUni; | 34 UniformHandle fKernelOffsetUni; |
35 UniformHandle fGainUni; | 35 UniformHandle fGainUni; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 return GrMatrixConvolutionEffect::Create(textures[texIdx], | 262 return GrMatrixConvolutionEffect::Create(textures[texIdx], |
263 bounds, | 263 bounds, |
264 kernelSize, | 264 kernelSize, |
265 kernel.get(), | 265 kernel.get(), |
266 gain, | 266 gain, |
267 bias, | 267 bias, |
268 kernelOffset, | 268 kernelOffset, |
269 tileMode, | 269 tileMode, |
270 convolveAlpha); | 270 convolveAlpha); |
271 } | 271 } |
OLD | NEW |