| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*); | 281 static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*); |
| 282 | 282 |
| 283 GrGLProgramBuilder(GrGLGpu*, const DrawArgs&); | 283 GrGLProgramBuilder(GrGLGpu*, const DrawArgs&); |
| 284 | 284 |
| 285 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim
itiveProcessor; } | 285 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim
itiveProcessor; } |
| 286 const GrOptDrawState& optState() const { return *fArgs.fOptState; } | 286 const GrOptDrawState& optState() const { return *fArgs.fOptState; } |
| 287 const GrProgramDesc& desc() const { return *fArgs.fDesc; } | 287 const GrProgramDesc& desc() const { return *fArgs.fDesc; } |
| 288 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; } | 288 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; } |
| 289 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } | 289 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } |
| 290 GrGpu::DrawType drawType() const { return fArgs.fDrawType; } | |
| 291 | 290 |
| 292 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 291 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
| 293 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're | 292 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're |
| 294 // generating stage code. | 293 // generating stage code. |
| 295 void nameVariable(SkString* out, char prefix, const char* name); | 294 void nameVariable(SkString* out, char prefix, const char* name); |
| 296 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. | 295 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. |
| 297 // If GrGLSLExpr4 has a valid name then it will use that instead | 296 // If GrGLSLExpr4 has a valid name then it will use that instead |
| 298 void nameExpression(GrGLSLExpr4*, const char* baseName); | 297 void nameExpression(GrGLSLExpr4*, const char* baseName); |
| 299 void emitAndInstallProcs(GrGLSLExpr4* inputColor, | 298 void emitAndInstallProcs(GrGLSLExpr4* inputColor, |
| 300 GrGLSLExpr4* inputCoverage); | 299 GrGLSLExpr4* inputCoverage); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 UniformInfoArray fUniforms; | 391 UniformInfoArray fUniforms; |
| 393 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 392 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
| 394 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 393 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
| 395 | 394 |
| 396 friend class GrGLShaderBuilder; | 395 friend class GrGLShaderBuilder; |
| 397 friend class GrGLVertexBuilder; | 396 friend class GrGLVertexBuilder; |
| 398 friend class GrGLFragmentShaderBuilder; | 397 friend class GrGLFragmentShaderBuilder; |
| 399 friend class GrGLGeometryBuilder; | 398 friend class GrGLGeometryBuilder; |
| 400 }; | 399 }; |
| 401 #endif | 400 #endif |
| OLD | NEW |