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; } |
290 | 291 |
291 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 292 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
292 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're | 293 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're |
293 // generating stage code. | 294 // generating stage code. |
294 void nameVariable(SkString* out, char prefix, const char* name); | 295 void nameVariable(SkString* out, char prefix, const char* name); |
295 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. | 296 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. |
296 // If GrGLSLExpr4 has a valid name then it will use that instead | 297 // If GrGLSLExpr4 has a valid name then it will use that instead |
297 void nameExpression(GrGLSLExpr4*, const char* baseName); | 298 void nameExpression(GrGLSLExpr4*, const char* baseName); |
298 void emitAndInstallProcs(GrGLSLExpr4* inputColor, | 299 void emitAndInstallProcs(GrGLSLExpr4* inputColor, |
299 GrGLSLExpr4* inputCoverage); | 300 GrGLSLExpr4* inputCoverage); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 UniformInfoArray fUniforms; | 392 UniformInfoArray fUniforms; |
392 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 393 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
393 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 394 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
394 | 395 |
395 friend class GrGLShaderBuilder; | 396 friend class GrGLShaderBuilder; |
396 friend class GrGLVertexBuilder; | 397 friend class GrGLVertexBuilder; |
397 friend class GrGLFragmentShaderBuilder; | 398 friend class GrGLFragmentShaderBuilder; |
398 friend class GrGLGeometryBuilder; | 399 friend class GrGLGeometryBuilder; |
399 }; | 400 }; |
400 #endif | 401 #endif |
OLD | NEW |