| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "glsl/GrGLSLProgramBuilder.h" | 8 #include "glsl/GrGLSLProgramBuilder.h" |
| 9 | 9 |
| 10 #include "GrPipeline.h" | 10 #include "GrPipeline.h" |
| 11 #include "glsl/GrGLSLFragmentProcessor.h" | 11 #include "glsl/GrGLSLFragmentProcessor.h" |
| 12 #include "glsl/GrGLSLGeometryProcessor.h" | 12 #include "glsl/GrGLSLGeometryProcessor.h" |
| 13 #include "glsl/GrGLSLVarying.h" | 13 #include "glsl/GrGLSLVarying.h" |
| 14 #include "glsl/GrGLSLXferProcessor.h" | 14 #include "glsl/GrGLSLXferProcessor.h" |
| 15 | 15 |
| 16 const int GrGLSLProgramBuilder::kVarsPerBlock = 8; | 16 const int GrGLSLProgramBuilder::kVarsPerBlock = 8; |
| 17 | 17 |
| 18 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const DrawArgs& args) | 18 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const DrawArgs& args) |
| 19 : fVS(this) | 19 : fVS(this) |
| 20 , fGS(this) | 20 , fGS(this) |
| 21 , fFS(this, args.fDesc->header().fFragPosKey) | 21 , fFS(this) |
| 22 , fStageIndex(-1) | 22 , fStageIndex(-1) |
| 23 , fArgs(args) | 23 , fArgs(args) |
| 24 , fGeometryProcessor(nullptr) | 24 , fGeometryProcessor(nullptr) |
| 25 , fXferProcessor(nullptr) { | 25 , fXferProcessor(nullptr) { |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool GrGLSLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, | 28 bool GrGLSLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, |
| 29 GrGLSLExpr4* inputCoverage, | 29 GrGLSLExpr4* inputCoverage, |
| 30 int maxTextures) { | 30 int maxTextures) { |
| 31 // First we loop over all of the installed processors and collect coord tran
sforms. These will | 31 // First we loop over all of the installed processors and collect coord tran
sforms. These will |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 delete fFragmentProcessors[i]; | 288 delete fFragmentProcessors[i]; |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 | 291 |
| 292 void GrGLSLProgramBuilder::finalizeShaders() { | 292 void GrGLSLProgramBuilder::finalizeShaders() { |
| 293 this->varyingHandler()->finalize(); | 293 this->varyingHandler()->finalize(); |
| 294 fVS.finalize(kVertex_GrShaderFlag); | 294 fVS.finalize(kVertex_GrShaderFlag); |
| 295 fFS.finalize(kFragment_GrShaderFlag); | 295 fFS.finalize(kFragment_GrShaderFlag); |
| 296 | 296 |
| 297 } | 297 } |
| OLD | NEW |