[cairo-commit] cairo/src cairo_traps.c,1.22,1.23
Carl Worth
commit at pdx.freedesktop.org
Mon Mar 7 14:23:09 PST 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv7222/src
Modified Files:
cairo_traps.c
Log Message:
* src/cairo_traps.c: Disable the "new" intersection code so that
the incorrect fill problems (test/fill_rule) go away.
Index: cairo_traps.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_traps.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cairo_traps.c 22 Feb 2005 19:35:03 -0000 1.22
+++ cairo_traps.c 7 Mar 2005 22:23:07 -0000 1.23
@@ -359,6 +359,29 @@
doesn't matter much anyway).
*/
+/* XXX: Keith's new intersection code is much cleaner, and uses
+ * sufficient precision for correctly sorting intersections according
+ * to the analysis in Hobby's paper.
+ *
+ * But, when we enable this code, some things are failing, (eg. the
+ * stars in test/fill_rule get filled wrong). This could indicate a
+ * bug in one of tree places:
+ *
+ * 1) The new intersection code in this file
+ *
+ * 2) cairo_wideint.c (which is only exercised here)
+ *
+ * 3) In the current tessellator, (where the old intersection
+ * code, with its mystic increments could be masking the bug).
+ *
+ * It will likely be easier to revisit this when the new tessellation
+ * code is in place. So, for now, we'll simply disable the new
+ * intersection code.
+ */
+
+#define CAIRO_TRAPS_USE_NEW_INTERSECTION_CODE 0
+
+#if CAIRO_TRAPS_USE_NEW_INTERSECTION_CODE
static const cairo_fixed_32_32_t
_det16_32 (cairo_fixed_16_16_t a,
cairo_fixed_16_16_t b,
@@ -458,6 +481,7 @@
return 1;
}
+#endif /* CAIRO_TRAPS_USE_NEW_INTERSECTION_CODE */
static cairo_fixed_16_16_t
_compute_x (cairo_line_t *line, cairo_fixed_t y)
@@ -469,7 +493,7 @@
return line->p1.x + (ex / dy);
}
-#if 0
+#if ! CAIRO_TRAPS_USE_NEW_INTERSECTION_CODE
static double
_compute_inverse_slope (cairo_line_t *l)
{
@@ -559,7 +583,7 @@
return 1;
}
-#endif
+#endif /* CAIRO_TRAPS_USE_NEW_INTERSECTION_CODE */
/* The algorithm here is pretty simple:
More information about the cairo-commit
mailing list