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

Unified Diff: src/gpu/effects/GrCustomXfermode.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/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomXfermode.cpp
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 04ff4a746ba733692ddab05ebb012f94ee341afb..459ff52948c361b76a7fbeb8d8886db7f058a4b7 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -172,17 +172,8 @@ private:
GrGLSLBlend::AppendMode(fragBuilder, srcColor, dstColor, outColor, xp.mode());
// 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 {}
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698