OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 7 |
8 | 8 |
9 #ifndef GrGLProgram_DEFINED | 9 #ifndef GrGLProgram_DEFINED |
10 #define GrGLProgram_DEFINED | 10 #define GrGLProgram_DEFINED |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 * coverageStages correspond to the output of GrGLProgramDesc::Build(). | 171 * coverageStages correspond to the output of GrGLProgramDesc::Build(). |
172 */ | 172 */ |
173 bool genProgram(const GrEffectStage* colorStages[], const GrEffectStage* cov
erageStages[]); | 173 bool genProgram(const GrEffectStage* colorStages[], const GrEffectStage* cov
erageStages[]); |
174 | 174 |
175 GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor)
; | 175 GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor)
; |
176 | 176 |
177 GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCov
erage); | 177 GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCov
erage); |
178 | 178 |
179 void genGeometryShader(GrGLShaderBuilder::VertexBuilder* vertexBuilder) cons
t; | 179 void genGeometryShader(GrGLShaderBuilder::VertexBuilder* vertexBuilder) cons
t; |
180 | 180 |
| 181 // Creates a set of GrGLEffects and GrGLDrawEffects. |
| 182 void buildGLEffects(SkTArray<EffectAndSamplers> GrGLProgram::* effectSet, |
| 183 const GrEffectStage* stages[], |
| 184 int count, |
| 185 bool hasExplicitLocalCoords, |
| 186 SkTArray<GrDrawEffect>* drawEffects, |
| 187 bool* hasVertexShaderEffects); |
| 188 |
181 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and
links the program | 189 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and
links the program |
182 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, | 190 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, |
183 bool bindColorOut, | 191 bool bindColorOut, |
184 bool bindDualSrcOut); | 192 bool bindDualSrcOut); |
185 | 193 |
186 // Sets the texture units for samplers | 194 // Sets the texture units for samplers |
187 void initSamplerUniforms(); | 195 void initSamplerUniforms(); |
188 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx); | 196 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx); |
189 | 197 |
190 bool compileShaders(const GrGLShaderBuilder& builder); | 198 bool compileShaders(const GrGLShaderBuilder& builder); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 GrGLProgramDesc fDesc; | 232 GrGLProgramDesc fDesc; |
225 GrGpuGL* fGpu; | 233 GrGpuGL* fGpu; |
226 | 234 |
227 GrGLUniformManager fUniformManager; | 235 GrGLUniformManager fUniformManager; |
228 UniformHandles fUniformHandles; | 236 UniformHandles fUniformHandles; |
229 | 237 |
230 typedef GrRefCnt INHERITED; | 238 typedef GrRefCnt INHERITED; |
231 }; | 239 }; |
232 | 240 |
233 #endif | 241 #endif |
OLD | NEW |