aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-07 22:39:01 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-07 22:39:01 +0000
commit6dee8759ab8c90dcffd76f114eec333405fd176e (patch)
tree240c8b7ef8de06dba838a34abd246a6bb54b14da /src/gpu/effects
parentf04c21dd64895cda33edb39199cee59b2f00083c (diff)
Add workaround for Xoom crashing after discard removed from shader.
R=robertphillips@google.com TBR=robertphillips@google.com BUG=skia:2149 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/133703016 git-svn-id: http://skia.googlecode.com/svn/trunk@13373 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrConvexPolyEffect.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 98af6948ea..2f641982d7 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -75,6 +75,10 @@ void GrGLConvexPolyEffect::emitCode(GrGLShaderBuilder* builder,
}
}
+ // Woe is me. See skbug.com/2149.
+ if (kTegra2_GrGLRenderer == builder->ctxInfo().renderer()) {
+ builder->fsCodeAppend("\t\tif (-1.0 == alpha) {\n\t\t\tdiscard;\n\t\t}\n");
+ }
builder->fsCodeAppendf("\t%s = %s;\n", outputColor,
(GrGLSLExpr4(inputColor) * GrGLSLExpr1("alpha")).c_str());
}