[cairo-commit] src/cairo-bentley-ottmann.c

M. Joonas Pihlaja joonas at kemper.freedesktop.org
Wed Jun 18 08:36:54 PDT 2008


 src/cairo-bentley-ottmann.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d36347e0e2079840ebde0e83791fdce4844e2994
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Wed Jun 18 18:35:42 2008 +0300

    Bug: tessellator sometimes ends rightmost trapezoids too late
    
    Reported on the cairo mailing list:
    
    http://lists.cairographics.org/archives/cairo/2008-May/014233.html
    
    The tessellator would sometimes produce self-intersecting trapezoids
    because it would skip the last edge in the active list when deciding
    whether we can continue the current trapezoid or not.
    
    The bug never caused a problem with pixman based rasterisation
    because pixman stops filling in a trapezoid once it detects a self
    intersection.

diff --git a/src/cairo-bentley-ottmann.c b/src/cairo-bentley-ottmann.c
index bc1f687..8e97f1f 100644
--- a/src/cairo-bentley-ottmann.c
+++ b/src/cairo-bentley-ottmann.c
@@ -1214,7 +1214,7 @@ _active_edges_to_traps (cairo_bo_edge_t		*head,
     int in_out = 0;
     cairo_bo_edge_t *edge;
 
-    for (edge = head; edge && edge->next; edge = edge->next) {
+    for (edge = head; edge; edge = edge->next) {
 	if (fill_rule == CAIRO_FILL_RULE_WINDING) {
 	    if (edge->reversed)
 		in_out++;


More information about the cairo-commit mailing list