Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp |
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
index 94d3dd67a93ae8df8da4e06b53d41286eddae558..c443e1e9925725e49cd6655191544d1cf92b75a3 100644 |
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
@@ -559,17 +559,8 @@ private: |
GrGLSLBlend::AppendMode(fragBuilder, srcColor, dstColor, outColor, xp.getXfermode()); |
// Apply coverage. |
- if (xp.dstReadUsesMixedSamples()) { |
- if (srcCoverage) { |
- fragBuilder->codeAppendf("%s *= %s;", outColor, srcCoverage); |
- fragBuilder->codeAppendf("%s = %s;", outColorSecondary, srcCoverage); |
- } else { |
- fragBuilder->codeAppendf("%s = vec4(1.0);", outColorSecondary); |
- } |
- } else if (srcCoverage) { |
- fragBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;", |
- outColor, srcCoverage, outColor, srcCoverage, dstColor); |
- } |
+ INHERITED::DefaultCoverageModulation(fragBuilder, srcCoverage, dstColor, outColor, |
+ outColorSecondary, xp); |
} |
void onSetData(const GrGLSLProgramDataManager&, const GrXferProcessor&) override {} |