[2/2] gdiplus: Implement GdipBeginContainer2 and GdipEndContainer

Vincent Povirk madewokherd+8cd9 at gmail.com
Fri Jul 3 13:01:53 CDT 2009


I don't think it's a good idea to rely on gdiplus functions being
called from only one thread. Most of gdiplus currently is not
thread-safe (maybe it should be), but it will work as long as a single
object is only used from a single thread at a time.

Adding global state makes things more complex, and that's part of the
reason I think it's better not to put it in the initial
implementation. If you do add it, I think you should do it in a
separate patch.

(I must confess my implementation of GdipNewInstalledFontCollection
breaks the little thread-safety we have, but the race condition
happens only the first time it's called.)

You can clean up global data in DllMain in the PROCESS_DETACH case.

-- 
Vincent Povirk



More information about the wine-devel mailing list