| 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 | |
| 189 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and
links the program | 181 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and
links the program |
| 190 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, | 182 bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, |
| 191 bool bindColorOut, | 183 bool bindColorOut, |
| 192 bool bindDualSrcOut); | 184 bool bindDualSrcOut); |
| 193 | 185 |
| 194 // Sets the texture units for samplers | 186 // Sets the texture units for samplers |
| 195 void initSamplerUniforms(); | 187 void initSamplerUniforms(); |
| 196 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx); | 188 void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx); |
| 197 | 189 |
| 198 bool compileShaders(const GrGLShaderBuilder& builder); | 190 bool compileShaders(const GrGLShaderBuilder& builder); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 GrGLProgramDesc fDesc; | 224 GrGLProgramDesc fDesc; |
| 233 GrGpuGL* fGpu; | 225 GrGpuGL* fGpu; |
| 234 | 226 |
| 235 GrGLUniformManager fUniformManager; | 227 GrGLUniformManager fUniformManager; |
| 236 UniformHandles fUniformHandles; | 228 UniformHandles fUniformHandles; |
| 237 | 229 |
| 238 typedef SkRefCnt INHERITED; | 230 typedef SkRefCnt INHERITED; |
| 239 }; | 231 }; |
| 240 | 232 |
| 241 #endif | 233 #endif |
| OLD | NEW |