GrTessellator: fix for disappearing thin path.
authorStephen White <senorblanco@chromium.org>
Mon, 16 Jan 2017 16:47:21 +0000 (11:47 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 17 Jan 2017 15:59:50 +0000 (15:59 +0000)
commiteaf0079d81beac9fea2da7a20c3587ebbbbe6463
tree7aae7f43f6a062edf4f8e0252a06c3e526f2389e
parentf76885694d4345363cb541170d18040a5c3f01cc
GrTessellator: fix for disappearing thin path.

simplify_boundary() was incorrectly comparing squared distances
against a non-squared constant. For .25 of a pixel, we need to
compare against 0.25 squared, or 0.0625.

This also includes a fix to get_edge_normal(), We were actually
returning edge "vectors", instead of edge normals. This wasn't
causing problems, since the error cancels itself out, but it's
confusing.

BUG=skia:

Change-Id: I0d50f2d001ed5e41de2900139c396b9ef75d2ddf
Reviewed-on: https://skia-review.googlesource.com/7043
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
gm/thinconcavepaths.cpp
src/gpu/GrTessellator.cpp