Index: src/gpu/effects/GrOvalEffect.cpp |
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp |
index e033a896d8c8242c2b4874119adeef59faac52e1..97b977f7542b8a357e8700d2c406fa0cf37751e8 100644 |
--- a/src/gpu/effects/GrOvalEffect.cpp |
+++ b/src/gpu/effects/GrOvalEffect.cpp |
@@ -317,9 +317,8 @@ void GLEllipseEffect::emitCode(GrGLShaderBuilder* builder, |
builder->fsCodeAppend("\t\tfloat implicit = dot(Z, d) - 1.0;\n"); |
// grad_dot is the squared length of the gradient of the implicit. |
builder->fsCodeAppendf("\t\tfloat grad_dot = 4.0 * dot(Z, Z);\n"); |
- if (builder->ctxInfo().caps()->dropsTileOnZeroDivide()) { |
- builder->fsCodeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); |
- } |
+ // avoid calling inversesqrt on zero. |
+ builder->fsCodeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); |
builder->fsCodeAppendf("\t\tfloat approx_dist = implicit * inversesqrt(grad_dot);\n"); |
switch (ee.getEdgeType()) { |