aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLXferProcessor.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-12-01 13:54:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-01 13:54:06 -0800
commitf34b293681ea49aaa4aaa70d84515e4a58a112e7 (patch)
treed7d6a4175405abe7d3fff23fb31974d910bda374 /src/gpu/glsl/GrGLSLXferProcessor.cpp
parent7bceedc550513b13e0065aca66e55204a2ba3e1f (diff)
Add in shader blending for CoverageSetOp XP
Diffstat (limited to 'src/gpu/glsl/GrGLSLXferProcessor.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLXferProcessor.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index 7382660f42..b6af968651 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -63,23 +63,11 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
this->emitBlendCodeForDstRead(args.fPB,
fragBuilder,
args.fInputColor,
+ args.fInputCoverage,
dstColor,
args.fOutputPrimary,
+ args.fOutputSecondary,
args.fXP);
-
- // Apply coverage.
- if (args.fXP.dstReadUsesMixedSamples()) {
- if (args.fInputCoverage) {
- fragBuilder->codeAppendf("%s *= %s;", args.fOutputPrimary, args.fInputCoverage);
- fragBuilder->codeAppendf("%s = %s;", args.fOutputSecondary, args.fInputCoverage);
- } else {
- fragBuilder->codeAppendf("%s = vec4(1.0);", args.fOutputSecondary);
- }
- } else if (args.fInputCoverage) {
- fragBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;",
- args.fOutputPrimary, args.fInputCoverage,
- args.fOutputPrimary, args.fInputCoverage, dstColor);
- }
}
void GrGLSLXferProcessor::setData(const GrGLSLProgramDataManager& pdm, const GrXferProcessor& xp) {