Hi Sven, On Sun, 2006-06-11 at 05:05 +0200, Sven de Marothy wrote: > On Sat, 2006-06-10 at 23:17 +0200, Mark Wielaard wrote: > > I was seeing deadlocks in some cases with ComponentGraphics.drawImage(). > > ComponentGraphics takes the gdk lock and then calls super.drawImage(). > > But in some cases when the image isn't a BufferedImage CairoGraphics > > would recurse into drawImage() again. And since the gdk lock isn't > > reentrant that would cause a deadlock. There was a second problem if the > > image was the error image, in that case it wouldn't have a ImageProducer > > and later on in CairoGraphics.drawImage() an Exception would be thrown. > > In that case the gdk lock would never be released. To prevent against > > such situations this patch also moves all operations that have to > > operate with the gdk lock held into a try-finally block to make sure the > > lock is always released. > > Looks OK.
Thanks. Committed. > But on a seperate but related note, could we move that "error > image" stuff to a seperate dummy class instead though? Yes, that would be a good idea. Cheers, Mark
signature.asc
Description: This is a digitally signed message part