diff options
author | Stephen White <senorblanco@chromium.org> | 2017-05-05 15:54:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-08 15:43:40 +0000 |
commit | ff60b17f6772722235e05217f9780acd8399bc5d (patch) | |
tree | d9c6f4998efc3db99f8451717f3d8355a9cb10c5 /src | |
parent | 63f717da11c7dbb65cb05e97dac660bf505853a2 (diff) |
GrTessellator AA: fix 1px wide paths.
Move 0 count check below the call to count outer polygons,
so we don't abort on a path with outer but no inner
geometry.
This fixes the "thin_right_angle" and "thin_rect_and_triangle"
samples when running GM:thinconcavepaths --pr tess.
Change-Id: I9a75711787f729ce3a1d5313daa491098e397184
Reviewed-on: https://skia-review.googlesource.com/15661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrTessellator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index a40bfb402b..a4ec79373a 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -1833,12 +1833,12 @@ int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBo isLinear, &outerMesh); SkPath::FillType fillType = antialias ? SkPath::kWinding_FillType : path.getFillType(); int count = count_points(polys, fillType); - if (0 == count) { - return 0; - } if (antialias) { count += count_outer_mesh_points(outerMesh); } + if (0 == count) { + return 0; + } void* verts = vertexAllocator->lock(count); if (!verts) { |