<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>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?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Nick<BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 13px"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Benjamin Otte <otte@redhat.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Lufy D.Monkey <lufy2012@yahoo.ca><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> cairo@cairographics.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sat, July 10, 2010 4:00:33 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [cairo] Multi-thread issue in cairo-win32-font.c<BR></FONT><BR>You are right that Cairo is supposed to allow rendering of unshared<BR>surfaces in multiple threads if the underlying rendering system allows<BR>that.<BR>So if Windows is totally broken and not thread-safe, this sounds like a<BR>bug. Unfortunately I don't use the Windows backend, so I can't fix it.<BR>Would you be able to provide a patch that does?<BR><BR>Benjamin<BR><BR><BR>On Fri, 2010-07-09 at 18:02 -0700, Lufy D.Monkey wrote:<BR>> Hi,<BR>> <BR>> I had encountered a
multi-thread issue in cairo-win32-font.c line 133<BR>> to line 153 (_get_global_font_dc()). There is a static variable in<BR>> this function and when two threas are rendering the text. Although<BR>> they dosen't share any cairo_t* or cairo_surface_t* it will end up<BR>> failing the cairo rendering because of this static variable. I am not<BR>> sure if anyone had reported this problem but I think the protection<BR>> should be done in cairo library (I think cairo is a thread safty<BR>> library, correct me if I am wrong). It doesn't make sence to protect<BR>> in the application level: protecting threads that dosen't share<BR>> anyhing.<BR>> <BR>> any ideas?<BR>> <BR>> Thanks,<BR>> Nick<BR>> <BR>> --<BR>> cairo mailing list<BR>> <A href="mailto:cairo@cairographics.org" ymailto="mailto:cairo@cairographics.org">cairo@cairographics.org</A><BR>> <A
href="http://lists.cairographics.org/mailman/listinfo/cairo" target=_blank>http://lists.cairographics.org/mailman/listinfo/cairo</A><BR><BR><BR></DIV></DIV></div><br></body></html>