Make event_queue_insert ignore duplicate intersection events (not duplicate start/stop events)

This fixes the failures of the new tessellator with the 3 tests:
bitmap-font, rectangle-rounding-error, and close-path
The problem was that identical edges from separate polygons
were not being added to the event queue, (because of a check
that was actually only intended to prevent an intersection
event from being scheduled multiple times).
This commit is contained in:
Carl Worth 2006-09-22 17:28:00 -07:00
parent 4cd871b6f3
commit 762bd1330d

View file

@ -598,9 +598,14 @@ static void
_cairo_bo_event_queue_insert (cairo_bo_event_queue_t *queue,
cairo_bo_event_t *event)
{
/* Don't insert if there's already an equivalent event in the queue. */
if (skip_list_find (queue, event) == NULL)
skip_list_insert (queue, event);
/* Don't insert if there's already an equivalent intersection event in the queue. */
if (event->type == CAIRO_BO_EVENT_TYPE_INTERSECTION &&
skip_list_find (queue, event) != NULL)
{
return;
}
skip_list_insert (queue, event);
}
static void