diff options
author | 2018-04-03 11:28:15 -0400 | |
---|---|---|
committer | 2018-04-03 16:04:50 +0000 | |
commit | ea49523b5f47fb795a9d65bc5b88229089b75dc7 (patch) | |
tree | dc49815083922e0fb472f7ad4fa3c453fca9132d /src/gpu/GrTessellator.cpp | |
parent | b88045bdc24095bc9370c9166ac1d9ee062e116f (diff) |
GrTessellator: fix for points that become infinite on stroking.
stroke -> Inf -> NaN -> assert.
BUG=skia:7775
Change-Id: I086883bce90d1d473cff87f67e954718ea3181f6
Reviewed-on: https://skia-review.googlesource.com/118145
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTessellator.cpp')
-rw-r--r-- | src/gpu/GrTessellator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index b8ec6551c9..5136f23c42 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -2015,6 +2015,10 @@ void stroke_boundary(EdgeList* boundary, VertexList* innerMesh, VertexList* oute } innerPoint1 = innerPoint2 = innerPoint; } + if (!innerPoint1.isFinite() || !innerPoint2.isFinite() || + !outerPoint1.isFinite() || !outerPoint2.isFinite()) { + continue; + } LOG("inner (%g, %g), (%g, %g), ", innerPoint1.fX, innerPoint1.fY, innerPoint2.fX, innerPoint2.fY); LOG("outer (%g, %g), (%g, %g)\n", |