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

Unified Diff: src/gpu/gl/GrGLXferProcessor.cpp

Issue 1164973002: Add mixed samples support to XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_reenablebea
Patch Set: Created 5 years, 6 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/effects/GrPorterDuffXferProcessor.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLXferProcessor.cpp
diff --git a/src/gpu/gl/GrGLXferProcessor.cpp b/src/gpu/gl/GrGLXferProcessor.cpp
index 3d3ab49dadc89ba64e0c84c40ca21284286af26a..e62497193fbcc38a39c42b2138ee0fe3ca50e26c 100644
--- a/src/gpu/gl/GrGLXferProcessor.cpp
+++ b/src/gpu/gl/GrGLXferProcessor.cpp
@@ -63,7 +63,14 @@ void GrGLXferProcessor::emitCode(const EmitArgs& args) {
args.fXP);
// Apply coverage.
- if (args.fXP.readsCoverage()) {
+ if (args.fXP.dstReadUsesMixedSamples()) {
+ if (args.fXP.readsCoverage()) {
+ fsBuilder->codeAppendf("%s *= %s;", args.fOutputPrimary, args.fInputCoverage);
+ fsBuilder->codeAppendf("%s = %s;", args.fOutputSecondary, args.fInputCoverage);
+ } else {
+ fsBuilder->codeAppendf("%s = vec4(1.0);", args.fOutputSecondary);
+ }
+ } else if (args.fXP.readsCoverage()) {
fsBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;",
args.fOutputPrimary, args.fInputCoverage,
args.fOutputPrimary, args.fInputCoverage, dstColor);
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698