<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>OK I had attached a patch for this problem. Bassically we can just create a new HDC when we need it and delete the HDC after it is done to solve this problem. But it seems not efficient so I added a cache array to cache the HDC based on the thread id so that it won't crreate and delete the HDC all the time. The tradeoff is that I need to add a "CAIRO Mutex" to protect this cache array. </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> Wed, July 14, 2010 4:43:22 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [cairo] Multi-thread issue in cairo-win32-font.c<BR></FONT><BR>On Tue, 2010-07-13 at 20:30 -0700, Lufy D.Monkey wrote:<BR>> I had a solution for this but I am not sure what the process is to<BR>> review/submit the patch? Do you have any document on this?<BR>> <BR>Turns out we don't have a document on patch submission. The steps are<BR>basically:<BR>1) Produce a patch<BR>We take patches in "unified diff" form. That's the form that running the<BR>command "diff -u" outputs. All git commands produce patches in this<BR>format.<BR>If you run git
on Windows, you can just use "git format-patch" to create<BR>the patches. If you work with tarballs, you can either install the MSYS<BR>or Cygwin version of the diff utility or use Google to find a better<BR>tool for the job.<BR><BR>2) Submit the patch<BR>People usually submit patches either as bugs in our bugtracker at<BR><A href="https://bugs.freedesktop.org/" target=_blank>https://bugs.freedesktop.org</A> or, send them to this mailing list or show<BR>up in our IRC channel to discuss it.<BR><BR><BR>The whole process is pretty flexible, it's based around two rules:<BR>1) We need to get the patch in an easy format for review and committing.<BR>2) We need to get back o you if we have questions about it.<BR><BR><BR>Benjamin<BR><BR><BR></DIV></DIV></div><br></body></html>