| Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| index b5108a74d0fcfb7abe188e6d38575ba7b07f5370..0849d810debb5b6005c311e31a04d6376667a672 100644
|
| --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
| @@ -140,7 +140,8 @@ bool GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr
|
| this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors(), inputColor);
|
| this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(), numProcs,
|
| inputCoverage);
|
| - this->emitAndInstallXferProc(*this->pipeline().getXferProcessor(), *inputColor, *inputCoverage);
|
| + this->emitAndInstallXferProc(*this->pipeline().getXferProcessor(), *inputColor, *inputCoverage,
|
| + this->pipeline().readsCoverage());
|
| return true;
|
| }
|
|
|
| @@ -266,7 +267,8 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrPrimitiveProcessor& gp,
|
|
|
| void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
|
| const GrGLSLExpr4& colorIn,
|
| - const GrGLSLExpr4& coverageIn) {
|
| + const GrGLSLExpr4& coverageIn,
|
| + bool readsCoverage) {
|
| // Program builders have a bit of state we need to clear with each effect
|
| AutoStageAdvance adv(this);
|
|
|
| @@ -295,7 +297,7 @@ void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
|
| &fFS,
|
| this->glslCaps(),
|
| xp, colorIn.c_str(),
|
| - coverageIn.c_str(),
|
| + readsCoverage ? coverageIn.c_str() : nullptr,
|
| fFS.getPrimaryColorOutputName(),
|
| fFS.getSecondaryColorOutputName(),
|
| samplers);
|
|
|