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

Unified Diff: src/gpu/effects/GrConvexPolyEffect.cpp

Issue 133703016: Add workaround for Xoom crashing after discard removed from shader. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add tab Created 6 years, 10 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 | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConvexPolyEffect.cpp
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index e47ed0f86606b93d42913c8ad298023fefa4e276..315fd7fb4b90c50ceef24810574fafa37c0063fd 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());
}
« no previous file with comments | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698