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 | 7 |
8 #ifndef GrGLProgramBuilder_DEFINED | 8 #ifndef GrGLProgramBuilder_DEFINED |
9 #define GrGLProgramBuilder_DEFINED | 9 #define GrGLProgramBuilder_DEFINED |
10 | 10 |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 int arrayCount, | 312 int arrayCount, |
313 const char** outName) override; | 313 const char** outName) override; |
314 | 314 |
315 // Used to add a uniform for frag position without mangling the name of the
uniform inside of a | 315 // Used to add a uniform for frag position without mangling the name of the
uniform inside of a |
316 // stage. | 316 // stage. |
317 UniformHandle addFragPosUniform(uint32_t visibility, | 317 UniformHandle addFragPosUniform(uint32_t visibility, |
318 GrSLType type, | 318 GrSLType type, |
319 GrSLPrecision precision, | 319 GrSLPrecision precision, |
320 const char* name, | 320 const char* name, |
321 const char** outName) { | 321 const char** outName) { |
322 SkDebugf("in my frag pos thing\n"); | |
323 return this->internalAddUniformArray(visibility, type, precision, name,
false, 0, outName); | 322 return this->internalAddUniformArray(visibility, type, precision, name,
false, 0, outName); |
324 } | 323 } |
325 | 324 |
326 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 325 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
327 // char (unless the prefix is '\0'). It also will mangle the name to be stag
e-specific unless | 326 // char (unless the prefix is '\0'). It also will mangle the name to be stag
e-specific unless |
328 // explicitly asked not to. | 327 // explicitly asked not to. |
329 void nameVariable(SkString* out, char prefix, const char* name, bool mangle
= true); | 328 void nameVariable(SkString* out, char prefix, const char* name, bool mangle
= true); |
330 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. | 329 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. |
331 // If GrGLSLExpr4 has a valid name then it will use that instead | 330 // If GrGLSLExpr4 has a valid name then it will use that instead |
332 void nameExpression(GrGLSLExpr4*, const char* baseName); | 331 void nameExpression(GrGLSLExpr4*, const char* baseName); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 421 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
423 SkTArray<UniformHandle> fSamplerUniforms; | 422 SkTArray<UniformHandle> fSamplerUniforms; |
424 SeparableVaryingInfoArray fSeparableVaryingInfos; | 423 SeparableVaryingInfoArray fSeparableVaryingInfos; |
425 | 424 |
426 friend class GrGLShaderBuilder; | 425 friend class GrGLShaderBuilder; |
427 friend class GrGLVertexBuilder; | 426 friend class GrGLVertexBuilder; |
428 friend class GrGLFragmentShaderBuilder; | 427 friend class GrGLFragmentShaderBuilder; |
429 friend class GrGLGeometryBuilder; | 428 friend class GrGLGeometryBuilder; |
430 }; | 429 }; |
431 #endif | 430 #endif |
OLD | NEW |