[cairo-commit] src/cairo-bentley-ottmann-rectangular.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Aug 30 02:13:15 PDT 2009
src/cairo-bentley-ottmann-rectangular.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit a6bcb6260ec8982493ac3411436ec007b40e4501
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Aug 30 10:09:51 2009 +0100
[bo-rectangular] Fix assertion failure with insertion sort
We remember the location of the last insert as the next edge is likely to
be nearby. However, we need to be careful when the pointer rests upon the
HEAD and ensure that we begin the search from the appropriate end.
diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c
index a805f57..53faba6 100644
--- a/src/cairo-bentley-ottmann-rectangular.c
+++ b/src/cairo-bentley-ottmann-rectangular.c
@@ -570,6 +570,8 @@ _cairo_bo_sweep_line_insert (cairo_bo_sweep_line_t *sweep_line,
/* right edge */
pos = sweep_line->current_right;
+ if (pos == &sweep_line->sweep)
+ pos = sweep_line->sweep.prev;
if (pos != &sweep_line->sweep) {
int cmp;
@@ -596,6 +598,8 @@ _cairo_bo_sweep_line_insert (cairo_bo_sweep_line_t *sweep_line,
/* left edge */
pos = sweep_line->current_left;
+ if (pos == &sweep_line->sweep)
+ pos = sweep_line->sweep.next;
if (pos != &sweep_line->sweep) {
int cmp;
More information about the cairo-commit
mailing list