Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Unified Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1607253002: Add gpu implementation of OverdrawXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update FP & XP Factory counts Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698