[stroke] Only mark traps as having intersection if non-empty.

We were hitting an assertion attempting to eliminate intersections inside
the rectilinear tessellator for empty strokes. We can avoid this
assertion, by only marking the traps as having potential intersections iff
it is non-empty.
This commit is contained in:
Chris Wilson 2009-08-13 15:57:30 +01:00
parent 60d73da9f2
commit dbd9438f5d

View file

@ -1493,9 +1493,6 @@ _cairo_rectilinear_stroker_init (cairo_rectilinear_stroker_t *stroker,
_cairo_stroker_dash_init (&stroker->dash, stroke_style);
stroker->has_bounds = FALSE;
/* As we incrementally tessellate, we do not eliminate self-intersections */
stroker->traps->has_intersections = TRUE;
}
static void
@ -2032,6 +2029,8 @@ _cairo_path_fixed_stroke_rectilinear_to_traps (const cairo_path_fixed_t *path,
status = _cairo_rectilinear_stroker_emit_segments (&rectilinear_stroker);
traps->is_rectilinear = 1;
/* As we incrementally tessellate, we do not eliminate self-intersections */
traps->has_intersections = traps->num_traps != 0;
BAIL:
_cairo_rectilinear_stroker_fini (&rectilinear_stroker);