Fix for bug #4165:
Use pointer comparison for coincident points to ensure a well-defined ordering, and avoid setting discard on both points. This fixes problems with my Mac's implementation of qsort. Final patch by Bertram Felgenhauer. Update reference images after the change.
18
ChangeLog
|
|
@ -1,3 +1,21 @@
|
|||
2005-08-21 Billy Biggs <vektor@dumbterm.net>
|
||||
|
||||
Fix for bug #4165:
|
||||
|
||||
* src/cairo-hull.c: (_cairo_hull_vertex_compare): Use pointer
|
||||
comparison for coincident points to ensure a well-defined
|
||||
ordering, and avoid setting discard on both points. This fixes
|
||||
problems with my Mac's implementation of qsort. Final patch by
|
||||
Bertram Felgenhauer.
|
||||
|
||||
* test/clip-operator-ref.png:
|
||||
* test/linear-gradient-ref.png:
|
||||
* test/operator-clear-ref.png:
|
||||
* test/operator-source-ref.png:
|
||||
* test/unantialiased-shapes-ref.png:
|
||||
* test/unbounded-operator-ref.png: Update reference images after
|
||||
the change.
|
||||
|
||||
2005-08-21 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* autogen.sh: Check automake-<ver> if automake isn't sufficiently
|
||||
|
|
|
|||
|
|
@ -97,7 +97,12 @@ _cairo_hull_vertex_compare (const void *av, const void *bv)
|
|||
(cairo_fixed_48_16_t) a->slope.dy * a->slope.dy);
|
||||
b_dist = ((cairo_fixed_48_16_t) b->slope.dx * b->slope.dx +
|
||||
(cairo_fixed_48_16_t) b->slope.dy * b->slope.dy);
|
||||
if (a_dist < b_dist) {
|
||||
/*
|
||||
* Use pointer comparison for coincident points to ensure
|
||||
* a well-defined ordering, and avoid setting discard on
|
||||
* both points.
|
||||
*/
|
||||
if (a_dist < b_dist || (a_dist == b_dist && a < b)) {
|
||||
a->discard = 1;
|
||||
ret = -1;
|
||||
} else {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |