[cairo-bugs] [Bug 74355] Line drawing not thread-safe
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Feb 3 10:25:06 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=74355
Uli Schlachter <psychon at znc.in> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Uli Schlachter <psychon at znc.in> ---
(In reply to comment #0)
> 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).
Sure, just an array. And this works as long as you expect anything like useful
results. Cairo is supposed to be thread-safe as long as the threads don't share
any state (well, this is an oversimplification, but your first approach isn't
supposed to work).
> 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.
Since this is so simple, do you have some small, self-contained C code that
only depends on some threading API and cairo and that reproduces this problem?
--
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/20140203/eea070ce/attachment.html>
More information about the cairo-bugs
mailing list