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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; } | 283 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; } |
284 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } | 284 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } |
285 | 285 |
286 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 286 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
287 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're | 287 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're |
288 // generating stage code. | 288 // generating stage code. |
289 void nameVariable(SkString* out, char prefix, const char* name); | 289 void nameVariable(SkString* out, char prefix, const char* name); |
290 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. | 290 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. |
291 // If GrGLSLExpr4 has a valid name then it will use that instead | 291 // If GrGLSLExpr4 has a valid name then it will use that instead |
292 void nameExpression(GrGLSLExpr4*, const char* baseName); | 292 void nameExpression(GrGLSLExpr4*, const char* baseName); |
293 void emitAndInstallProcs(GrGLSLExpr4* inputColor, | 293 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage
); |
294 GrGLSLExpr4* inputCoverage); | |
295 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); | 294 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); |
296 void emitAndInstallProc(const GrPendingFragmentStage&, | 295 void emitAndInstallProc(const GrPendingFragmentStage&, |
297 int index, | 296 int index, |
298 const GrGLSLExpr4& input, | 297 const GrGLSLExpr4& input, |
299 GrGLSLExpr4* output); | 298 GrGLSLExpr4* output); |
300 | 299 |
301 void emitAndInstallProc(const GrPrimitiveProcessor&, | 300 void emitAndInstallProc(const GrPrimitiveProcessor&, |
302 GrGLSLExpr4* outputColor, | 301 GrGLSLExpr4* outputColor, |
303 GrGLSLExpr4* outputCoverage); | 302 GrGLSLExpr4* outputCoverage); |
304 | 303 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 UniformInfoArray fUniforms; | 390 UniformInfoArray fUniforms; |
392 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 391 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
393 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 392 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
394 | 393 |
395 friend class GrGLShaderBuilder; | 394 friend class GrGLShaderBuilder; |
396 friend class GrGLVertexBuilder; | 395 friend class GrGLVertexBuilder; |
397 friend class GrGLFragmentShaderBuilder; | 396 friend class GrGLFragmentShaderBuilder; |
398 friend class GrGLGeometryBuilder; | 397 friend class GrGLGeometryBuilder; |
399 }; | 398 }; |
400 #endif | 399 #endif |
OLD | NEW |