diff options
author | Carl Worth <cworth@cworth.org> | 2006-09-22 17:28:00 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-11-22 16:56:51 -0800 |
commit | 762bd1330d5e3148ddd60949866227cb75b782d6 (patch) | |
tree | a30675dcec744f29e2449af68a68002180e7db08 | |
parent | 4cd871b6f371e86c252c2fa8d8af481d822a1dec (diff) |
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).
-rw-r--r-- | src/cairo-bentley-ottmann.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cairo-bentley-ottmann.c b/src/cairo-bentley-ottmann.c index d300dcaf..384372bc 100644 --- a/src/cairo-bentley-ottmann.c +++ b/src/cairo-bentley-ottmann.c @@ -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 |