Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp |
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
index 8ea03fbba7ff50c0d475336793c6a0dca0f42aca..daa0b6ba064205fccc2f89605d07f35bb6828841 100644 |
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
@@ -237,9 +237,13 @@ void GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr |
if (GrProgramDesc::kAttribute_ColorInput == header.fColorInput) { |
*inputColor = outputColor; |
} |
- if (GrProgramDesc::kUniform_ColorInput != header.fCoverageInput) { |
- *inputCoverage = outputCoverage; |
+ |
+ // We may have uniform coverage, if so we need to multiply the GPs output by the uniform |
+ // coverage |
+ if (GrProgramDesc::kUniform_ColorInput == header.fCoverageInput) { |
+ fFS.codeAppendf("%s *= %s;", outputCoverage.c_str(), inputCoverage->c_str()); |
} |
+ *inputCoverage = outputCoverage; |
} |
fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs)); |