<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&nbsp;a new&nbsp;HDC when we need it and delete the HDC after&nbsp;it is done to solve this problem. But it seems not efficient so I&nbsp;added a cache array to cache the HDC based on the thread id so that it won't crreate and delete the&nbsp;HDC&nbsp;all the time. The tradeoff is that I&nbsp;need to add a &nbsp;"CAIRO Mutex" to protect this cache array. </DIV>
<DIV>&nbsp;</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 &lt;otte@redhat.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Lufy D.Monkey &lt;lufy2012@yahoo.ca&gt;<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>&gt; I had a solution for this but I am not sure what the process is to<BR>&gt; review/submit the patch? Do you have any document on this?<BR>&gt;&nbsp; <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>