Index: src/effects/SkArithmeticMode_gpu.cpp |
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp |
index ce8e426d412d527606bb7b338cfd030ae72c7d94..29c6602146db3c1504418923e419f1d45aba9991 100644 |
--- a/src/effects/SkArithmeticMode_gpu.cpp |
+++ b/src/effects/SkArithmeticMode_gpu.cpp |
@@ -226,17 +226,8 @@ private: |
add_arithmetic_code(fragBuilder, srcColor, dstColor, outColor, kUni, fEnforcePMColor); |
// Apply coverage. |
- if (proc.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, proc); |
} |
void onSetData(const GrGLSLProgramDataManager& pdman, |