Bug 4599 - Missing wedges on some paths
Summary: Missing wedges on some paths
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.0.0
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-26 10:26 UTC by tor
Modified: 2005-10-02 19:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
minimal svg testcase (388 bytes, image/svg+xml)
2005-09-26 10:27 UTC, tor
Details
win32 screenshot of testcase (30.93 KB, image/png)
2005-09-26 10:28 UTC, tor
Details
C version of test case (861 bytes, text/plain)
2005-09-26 10:58 UTC, Carl Worth
Details
A possible fix (untested and uncommented) (601 bytes, patch)
2005-09-29 14:28 UTC, Carl Worth
Details | Splinter Review
another proposed fix (1.17 KB, patch)
2005-09-29 16:53 UTC, Bertram Felgenhauer
Details | Splinter Review
updated patch (2.01 KB, patch)
2005-09-29 17:17 UTC, Bertram Felgenhauer
Details | Splinter Review

Description tor 2005-09-26 10:26:56 UTC
Poking around openclipart.org with Mozilla SVG using the cairo backend on win32,
I've noticed that some paths have missing wedges on paths.  These examples look
fine with the same version of cairo on linux.
Comment 1 tor 2005-09-26 10:27:39 UTC
Created attachment 3407 [details]
minimal svg testcase
Comment 2 tor 2005-09-26 10:28:12 UTC
Created attachment 3408 [details]
win32 screenshot of testcase
Comment 3 Carl Worth 2005-09-26 10:58:08 UTC
Created attachment 3409 [details]
C version of test case

Here's the SVG test case converted to a cairo-using program using the image
backend.

I would be interested in knowing two things:

1) What are the results from running this program as is on win32? (Here on my
linux machine the results are correct.)

2) What would it take to convert this program from using the image backend to
using cairo's win32 backend?

-Carl
Comment 4 Carl Worth 2005-09-26 10:59:27 UTC
I'm looking into this one.
Comment 5 Carl Worth 2005-09-29 10:01:52 UTC
So far we've determined that the C test case succeed on win32/gcc with a
standalone cairo, and fails on win32/VS with mozilla's cairo.

I think we're seeing compiler-dependent behavior here, rather than anything to
do with standalone vs. mozilla's cairo.

I'm now looking into why we're getting different sets of trapezoids out of the
tessellator in the two cases.
Comment 6 Carl Worth 2005-09-29 14:28:49 UTC
Created attachment 3434 [details] [review]
A possible fix (untested and uncommented)

Here's a possible fix. Please let me know if/what it changes.
Comment 7 Bertram Felgenhauer 2005-09-29 16:53:13 UTC
Created attachment 3436 [details] [review]
another proposed fix

Hmm, maybe qsort moves our hull points around in memory and makes the a<b
comparison not constant? This patch fixes that and a problem with discarding
points on initialisation.
Comment 8 Bertram Felgenhauer 2005-09-29 17:17:12 UTC
Created attachment 3437 [details] [review]
updated patch

Cleaned up version of previous patch (without a bug that that one contained)
Comment 9 Carl Worth 2005-09-29 17:22:00 UTC
The updated patch looks good to me. Please commit, and thanks!
Comment 10 Carl Worth 2005-10-03 12:23:43 UTC
2005-09-30  Bertram Felgenhauer  <int-e@gmx.de>

        reviewed by: keithp

        * src/cairo-hull.c (_cairo_hull_create): simplify id
        initialisation of last patch

        reviewed by: cworth

        * src/cairo-hull.c (_cairo_hull_create),
        (_cairo_hull_vertex_compare): Using a pointer comparison as the
        fallback total order was wrong - these pointers are not stable.
        So we introduce our own total order instead. (#4599)

        * ROADMAP: mark #4599 as fixed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.