[cairo] Multi-thread issue in cairo-win32-font.c

Benjamin Otte otte at redhat.com
Sat Jul 10 03:00:33 PDT 2010

You are right that Cairo is supposed to allow rendering of unshared
surfaces in multiple threads if the underlying rendering system allows
So if Windows is totally broken and not thread-safe, this sounds like a
bug. Unfortunately I don't use the Windows backend, so I can't fix it.
Would you be able to provide a patch that does?


On Fri, 2010-07-09 at 18:02 -0700, Lufy D.Monkey wrote:
> Hi,
> I had encountered a multi-thread issue in cairo-win32-font.c line 133
> to line 153 (_get_global_font_dc()). There is a static variable in
> this function and when two threas are rendering the text. Although
> they dosen't share any cairo_t* or cairo_surface_t* it will end up
> failing the cairo rendering because of this static variable. I am not
> sure if anyone had reported this problem but I think the protection
> should be done in cairo library (I think cairo is a thread safty
> library, correct me if I am wrong). It doesn't make sence to protect
> in the application level: protecting threads that dosen't share
> anyhing.
> any ideas?
> Thanks,
> Nick
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

More information about the cairo mailing list