Index: src/gpu/gl/GrGLXferProcessor.cpp |
diff --git a/src/gpu/gl/GrGLXferProcessor.cpp b/src/gpu/gl/GrGLXferProcessor.cpp |
index 3d3ab49dadc89ba64e0c84c40ca21284286af26a..e62497193fbcc38a39c42b2138ee0fe3ca50e26c 100644 |
--- a/src/gpu/gl/GrGLXferProcessor.cpp |
+++ b/src/gpu/gl/GrGLXferProcessor.cpp |
@@ -63,7 +63,14 @@ void GrGLXferProcessor::emitCode(const EmitArgs& args) { |
args.fXP); |
// Apply coverage. |
- if (args.fXP.readsCoverage()) { |
+ if (args.fXP.dstReadUsesMixedSamples()) { |
+ if (args.fXP.readsCoverage()) { |
+ fsBuilder->codeAppendf("%s *= %s;", args.fOutputPrimary, args.fInputCoverage); |
+ fsBuilder->codeAppendf("%s = %s;", args.fOutputSecondary, args.fInputCoverage); |
+ } else { |
+ fsBuilder->codeAppendf("%s = vec4(1.0);", args.fOutputSecondary); |
+ } |
+ } else if (args.fXP.readsCoverage()) { |
fsBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;", |
args.fOutputPrimary, args.fInputCoverage, |
args.fOutputPrimary, args.fInputCoverage, dstColor); |