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

Lufy D.Monkey lufy2012 at yahoo.ca
Thu Jul 15 15:39:44 PDT 2010


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. 


Thanks,
Nick




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

On Tue, 2010-07-13 at 20:30 -0700, Lufy D.Monkey wrote:
> 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?
>  
Turns out we don't have a document on patch submission. The steps are
basically:
1) Produce a patch
We take patches in "unified diff" form. That's the form that running the
command "diff -u" outputs. All git commands produce patches in this
format.
If you run git on Windows, you can just use "git format-patch" to create
the patches. If you work with tarballs, you can either install the MSYS
or Cygwin version of the diff utility or use Google to find a better
tool for the job.

2) Submit the patch
People usually submit patches either as bugs in our bugtracker at
https://bugs.freedesktop.org or, send them to this mailing list or show
up in our IRC channel to discuss it.


The whole process is pretty flexible, it's based around two rules:
1) We need to get the patch in an easy format for review and committing.
2) We need to get back o you if we have questions about it.


Benjamin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100715/8b3a8f05/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32font-multithread-issue.patch
Type: application/octet-stream
Size: 14633 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100715/8b3a8f05/attachment-0001.obj>


More information about the cairo mailing list