[cairo-bugs] [Bug 74355] New: Line drawing not thread-safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Feb 2 01:40:43 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=74355

          Priority: medium
            Bug ID: 74355
          Assignee: chris at chris-wilson.co.uk
           Summary: Line drawing not thread-safe
        QA Contact: cairo-bugs at cairographics.org
          Severity: major
    Classification: Unclassified
                OS: Windows (All)
          Reporter: hguijtra at xs4all.nl
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: 1.10.2
         Component: image backend
           Product: cairo

I'm drawing graphs with lots (millions) of tiny line pieces. To speed up this
process I used multiple threads to draw the line pieces. This greatly improves
performance, but typically causes a crash within a few minutes.

I've tried to do this in two ways:

1. share a single cairo_surface_t between the threads, and have each thread
draw using its own cairo_t. This crashes, but maybe I'm hoping for too much
(although an image surface is essentially just a big array of bytes that should
be writable from multiple threads). 

2. create a cairo_surface_t and cairo_t for each thread, and merge the results
after drawing has completed. This crashes in pixman. The only Cairo calls that
happen on a per-thread basis are cairo_set_line_cap, cairo_set_source_rgba,
cairo_set_line_width, cairo_set_dash, cairo_move_to, cairo_line_to, and
cairo_stroke.

Because I'm using the Gnome binary DLLs from
http://www.gtk.org/download/win32.php I cannot provide a meaningful stacktrace.
I have tried compiling a later version of Cairo but although I managed to
compile it, the resulting DLL is utterly unstable on Windows. However, I do
believe this might have something to do with the problem described at
http://lists.freedesktop.org/archives/cairo/2011-July/022123.html.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140202/d6725d64/attachment.html>


More information about the cairo-bugs mailing list