| Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| index 909ac76d62f73a2bd096f6ab12b0a1551c1280e9..7f8bc3c71a8381cacefcc9c0da37137ec3758ff5 100644
|
| --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| @@ -30,7 +30,8 @@ static const GrGLShaderVar::Precision kDefaultFragmentPrecision = GrGLShaderVar:
|
|
|
| ///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
| -bool GrGLProgramBuilder::genProgram(const GrGeometryStage* geometryProcessor,
|
| +bool GrGLProgramBuilder::genProgram(const GrOptDrawState& optState,
|
| + const GrGeometryStage* geometryProcessor,
|
| const GrFragmentStage* colorStages[],
|
| const GrFragmentStage* coverageStages[]) {
|
| const GrGLProgramDesc::KeyHeader& header = this->desc().getHeader();
|
| @@ -73,7 +74,7 @@ bool GrGLProgramBuilder::genProgram(const GrGeometryStage* geometryProcessor,
|
|
|
| fFS.emitCodeAfterEffects(inputColor, inputCoverage);
|
|
|
| - if (!this->finish()) {
|
| + if (!this->finish(optState)) {
|
| return false;
|
| }
|
|
|
| @@ -227,7 +228,7 @@ void GrGLProgramBuilder::emitSamplers(const GrProcessor& effect,
|
| }
|
| }
|
|
|
| -bool GrGLProgramBuilder::finish() {
|
| +bool GrGLProgramBuilder::finish(const GrOptDrawState& optState) {
|
| SkASSERT(0 == fProgramID);
|
| GL_CALL_RET(fProgramID, CreateProgram());
|
| if (!fProgramID) {
|
| @@ -241,7 +242,7 @@ bool GrGLProgramBuilder::finish() {
|
| return false;
|
| }
|
|
|
| - this->bindProgramLocations(fProgramID);
|
| + this->bindProgramLocations(optState, fProgramID);
|
|
|
| GL_CALL(LinkProgram(fProgramID));
|
|
|
| @@ -288,7 +289,8 @@ bool GrGLProgramBuilder::compileAndAttachShaders(GrGLuint programId,
|
| return fFS.compileAndAttachShaders(programId, shaderIds);
|
| }
|
|
|
| -void GrGLProgramBuilder::bindProgramLocations(GrGLuint programId) {
|
| +void GrGLProgramBuilder::bindProgramLocations(const GrOptDrawState& optState,
|
| + GrGLuint programId) {
|
| fFS.bindProgramLocations(programId);
|
|
|
| // skbug.com/2056
|
|
|