| 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 typedef GrGLProgramDataManager::UniformInfo UniformInfo; | 283 typedef GrGLProgramDataManager::UniformInfo UniformInfo; |
| 284 typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray; | 284 typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray; |
| 285 | 285 |
| 286 static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*); | 286 static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*); |
| 287 | 287 |
| 288 GrGLProgramBuilder(GrGLGpu*, const DrawArgs&); | 288 GrGLProgramBuilder(GrGLGpu*, const DrawArgs&); |
| 289 | 289 |
| 290 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim
itiveProcessor; } | 290 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim
itiveProcessor; } |
| 291 const GrPipeline& pipeline() const { return *fArgs.fPipeline; } | 291 const GrPipeline& pipeline() const { return *fArgs.fPipeline; } |
| 292 const GrProgramDesc& desc() const { return *fArgs.fDesc; } | 292 const GrProgramDesc& desc() const { return *fArgs.fDesc; } |
| 293 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; } | |
| 294 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } | 293 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(
); } |
| 295 | 294 |
| 296 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix | 295 // Generates a name for a variable. The generated string will be name prefix
ed by the prefix |
| 297 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're | 296 // char (unless the prefix is '\0'). It also mangles the name to be stage-sp
ecific if we're |
| 298 // generating stage code. | 297 // generating stage code. |
| 299 void nameVariable(SkString* out, char prefix, const char* name); | 298 void nameVariable(SkString* out, char prefix, const char* name); |
| 300 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. | 299 // Generates a possibly mangled name for a stage variable and writes it to t
he fragment shader. |
| 301 // If GrGLSLExpr4 has a valid name then it will use that instead | 300 // If GrGLSLExpr4 has a valid name then it will use that instead |
| 302 void nameExpression(GrGLSLExpr4*, const char* baseName); | 301 void nameExpression(GrGLSLExpr4*, const char* baseName); |
| 303 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage
); | 302 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage
); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 400 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
| 402 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 401 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
| 403 SkTArray<UniformHandle> fSamplerUniforms; | 402 SkTArray<UniformHandle> fSamplerUniforms; |
| 404 | 403 |
| 405 friend class GrGLShaderBuilder; | 404 friend class GrGLShaderBuilder; |
| 406 friend class GrGLVertexBuilder; | 405 friend class GrGLVertexBuilder; |
| 407 friend class GrGLFragmentShaderBuilder; | 406 friend class GrGLFragmentShaderBuilder; |
| 408 friend class GrGLGeometryBuilder; | 407 friend class GrGLGeometryBuilder; |
| 409 }; | 408 }; |
| 410 #endif | 409 #endif |
| OLD | NEW |