aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTessellator.cpp
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2017-08-23 13:56:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-23 18:19:46 +0000
commit73e7f80aa10aa3b74ed84541d72eac68a49c80d3 (patch)
tree0b26e04724046a9f06359499965d499d560d3ec6 /src/gpu/GrTessellator.cpp
parentcd71f115a846332d95b29fbeed3f315d8c01753d (diff)
GrTessellator: when sanitizing contours, remove non-finite points.
NaNs can't be correctly sorted. Don't run the unit test on VK backend, since it requires large (>64K bytes) vertex buffer uploads. Bug: 757650 Change-Id: I667693f135a090a5d9076bb7a2ec6879fc06d645 Reviewed-on: https://skia-review.googlesource.com/37484 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTessellator.cpp')
-rw-r--r--src/gpu/GrTessellator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index a77f23d708..a1ea284bab 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -1168,6 +1168,9 @@ void sanitize_contours(VertexList* contours, int contourCnt, bool approximate) {
if (coincident(prev->fPoint, v->fPoint)) {
LOG("vertex %g,%g coincident; removing\n", v->fPoint.fX, v->fPoint.fY);
contour->remove(v);
+ } else if (!v->fPoint.isFinite()) {
+ LOG("vertex %g,%g non-finite; removing\n", v->fPoint.fX, v->fPoint.fY);
+ contour->remove(v);
}
prev = v;
v = next;