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>
This commit is contained in:
parent
63f717da11
commit
ff60b17f67
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user