aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-11-30 10:15:58 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-30 10:15:58 -0800
commit56cf6dcb6572f1d355af041c1ebf157b2b3d0165 (patch)
treeb4bff299b4a41c8fc3cb02651cb8a252de50d3d5 /src/gpu/glsl
parentb1514801cc519b36d5d064c6d70dfdd788474f5d (diff)
Create a static instances of SrcOver XferProcessor
Diffstat (limited to 'src/gpu/glsl')
-rw-r--r--src/gpu/glsl/GrGLSLXferProcessor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index 4d2ec1074b..7382660f42 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);