Bugfixes for corner cases in per-edge AA

Specifically, it fixes non-aa perspective quads batched with aa quads
getting an unsafe edge distance that leads to bleeding on certain GPUs.

Additionally, it tweaks the rectilinear distance optimization to
add .5 for masked edge and .5 for opposite masked edge, instead of
adding 1 for just the masked edge. Leads to no change when all edges
have AA, but preserves the rate-of-change of the edge distance attribute
when opposite edges differ in their AA state.

Bug: skia:
Change-Id: Ie55042e74ef44a8d33b4ae16e1e63eecdb2f24e1
Reviewed-on: https://skia-review.googlesource.com/c/173420
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
1 file changed