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

Lufy D.Monkey lufy2012 at yahoo.ca
Tue Jul 13 20:30:04 PDT 2010


I had a solution for this but I am not sure what the process is to review/submit 
the patch? Do you have any document on this?

Thanks,
Nick




________________________________
From: Benjamin Otte <otte at redhat.com>
To: Lufy D.Monkey <lufy2012 at yahoo.ca>
Cc: cairo at cairographics.org
Sent: Sat, July 10, 2010 4:00:33 AM
Subject: Re: [cairo] Multi-thread issue in cairo-win32-font.c

You are right that Cairo is supposed to allow rendering of unshared
surfaces in multiple threads if the underlying rendering system allows
that.
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?

Benjamin


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100713/6b5f3d9e/attachment.htm>


More information about the cairo mailing list