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

Unified Diff: src/gpu/glsl/GrGLSLXferProcessor.cpp

Issue 1471293003: Create a static instances of SrcOver XferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Build Created 5 years, 1 month 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/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLXferProcessor.cpp
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index 4d2ec1074b381b800721a7ffb995cc67b72c21a9..7382660f426e2baf3ce5e7b48d2c24edca4ff046 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -24,7 +24,7 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
if (args.fXP.getDstTexture()) {
bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstTexture()->origin();
- if (args.fXP.readsCoverage()) {
+ if (args.fInputCoverage) {
// We don't think any shaders actually output negative coverage, but just as a safety
// check for floating point precision errors we compare with <= here
fragBuilder->codeAppendf("if (all(lessThanEqual(%s, vec4(0)))) {"
@@ -69,13 +69,13 @@ void GrGLSLXferProcessor::emitCode(const EmitArgs& args) {
// Apply coverage.
if (args.fXP.dstReadUsesMixedSamples()) {
- if (args.fXP.readsCoverage()) {
+ if (args.fInputCoverage) {
fragBuilder->codeAppendf("%s *= %s;", args.fOutputPrimary, args.fInputCoverage);
fragBuilder->codeAppendf("%s = %s;", args.fOutputSecondary, args.fInputCoverage);
} else {
fragBuilder->codeAppendf("%s = vec4(1.0);", args.fOutputSecondary);
}
- } else if (args.fXP.readsCoverage()) {
+ } else if (args.fInputCoverage) {
fragBuilder->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/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698