Adjust ellipse center epsilon further to fix dropouts

Bug: skia:
Change-Id: I93d754cdb7ad7f552d96fcbdf4137f2c699e3a55
Reviewed-on: https://skia-review.googlesource.com/138241
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2018-06-28 12:46:23 -04:00 committed by Skia Commit-Bot
parent 987dde94aa
commit 1de4439313

View File

@ -598,7 +598,7 @@ private:
if (args.fShaderCaps->halfIs32Bits()) { if (args.fShaderCaps->halfIs32Bits()) {
fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-6);"); fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-6);");
} else { } else {
fragBuilder->codeAppend("grad_dot = max(grad_dot, 3.1e-5);"); fragBuilder->codeAppend("grad_dot = max(grad_dot, 5.0e-5);");
} }
fragBuilder->codeAppend("half invlen = inversesqrt(grad_dot);"); fragBuilder->codeAppend("half invlen = inversesqrt(grad_dot);");
fragBuilder->codeAppend("half edgeAlpha = clamp(0.5-test*invlen, 0.0, 1.0);"); fragBuilder->codeAppend("half edgeAlpha = clamp(0.5-test*invlen, 0.0, 1.0);");
@ -754,7 +754,7 @@ private:
if (args.fShaderCaps->halfIs32Bits()) { if (args.fShaderCaps->halfIs32Bits()) {
fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-6);"); fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-6);");
} else { } else {
fragBuilder->codeAppend("grad_dot = max(grad_dot, 3.1e-5);"); fragBuilder->codeAppend("grad_dot = max(grad_dot, 5.0e-5);");
} }
fragBuilder->codeAppend("half invlen = inversesqrt(grad_dot);"); fragBuilder->codeAppend("half invlen = inversesqrt(grad_dot);");
if (DIEllipseStyle::kHairline == diegp.fStyle) { if (DIEllipseStyle::kHairline == diegp.fStyle) {