Re: [Pixman] Making ref counting thread safe

2011-01-08 Thread Soeren Sandmann
Siarhei Siamashka writes: > This problem looks bad enough to me, or at least makes me feel uneasy. > Changing > how the caching works could also cause some weird problems in the future > unless > everything is carefully taken into account. Also various tools like helgrind > will complain a lot

Re: [Pixman] Making ref counting thread safe

2011-01-08 Thread Bill Spitzak
Siarhei Siamashka wrote: I would suggest to generally forbid using the same pixman_image_t from multiple threads, but also add a function for creating pixman_image_t clone, which would share the pixel buffer with the original image and track pixel buffer lifetime via thread-safe refcounting. I

Re: [Pixman] Making ref counting thread safe

2011-01-07 Thread M Joonas Pihlaja
On Fri, 7 Jan 2011, Siarhei Siamashka wrote: > I would suggest to generally forbid using the same pixman_image_t from > multiple > threads, but also add a function for creating pixman_image_t clone, which > would share the pixel buffer with the original image and track pixel buffer > lifetime vi

Re: [Pixman] Making ref counting thread safe

2011-01-07 Thread Siarhei Siamashka
On Wednesday 05 January 2011 00:04:14 Soeren Sandmann wrote: > There are really two separate things to consider: The first is which > thread-related guarantees will pixman give? Adding atomic refcounts > would add a new guarantee that multiple threads can do ref/unref > simultaneously without causi

Re: [Pixman] Making ref counting thread safe

2011-01-04 Thread Soeren Sandmann
Siarhei Siamashka writes: > An interesting question is whether atomic refcounting is the only fix > required > or it is just the tip of the iceberg? > > How the multithreaded rendering is supposed to be done with cairo/pixman? I > can > imagine several scenarios: > a) Some set of images or i

Re: [Pixman] Making ref counting thread safe

2011-01-03 Thread Siarhei Siamashka
On Thursday 23 December 2010 23:00:54 Christian Hergert wrote: > Hi Folks, > > I've been using cairo to do some threaded rendering using an image surface. > After the rendering completes, it is pushed to an Xlib surface via the Gtk+ > main loop. However, being that pixman_image_ref() and pixman_im

Re: [Pixman] Making ref counting thread safe

2010-12-23 Thread Soeren Sandmann
Christian Hergert writes: > If I where to go through and work on making the reference counting > thread safe, what things would I need to make sure I take into > account for the patch to be accepted? For example: I put up some notes on the subject here: http://cgit.freedesktop.org/~sandman

[Pixman] Making ref counting thread safe

2010-12-23 Thread Christian Hergert
Hi Folks, I've been using cairo to do some threaded rendering using an image surface. After the rendering completes, it is pushed to an Xlib surface via the Gtk+ main loop. However, being that pixman_image_ref() and pixman_image_unref() use ++ and -- to increment and decrement ref counts, occasion