[cairo] cairo_in_fill() problems

Soeren Sandmann sandmann at daimi.au.dk
Wed Mar 25 17:22:15 PDT 2009


The attached program produces this image:

        http://imgur.com/ABJ5K.png

The light area is a circular path. The blue areas are where
cairo_in_fill() returned FALSE, the red where it returned
TRUE. The bug was introduced by this commit:

    commit f5965cb7d6559e051c2581fe446d0b9f40427eb2
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Wed Nov 5 23:48:52 2008 +0000

    [in-fill] Avoid tessellation by counting number of edge crossing to -°
    
    Benjamin Otte reports that in one particular benchmark cairo_in_fill() is
    a hotspot in the profile. Currently we tessellate the entire path and then
    search for a containing trapezoid. This is very expensive compared to the
    simple method of counting the number of edge crossing between the point of
    interest and x=-°. For example, this speeds tessellate-256 up by almost 3
    orders of magnitude.


Soren


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo-bug.c
Url: http://lists.cairographics.org/archives/cairo/attachments/20090326/1513bde6/attachment.c 


More information about the cairo mailing list