GNOME Bugzilla – Bug 680124
Quartz Image option , memory not zeroed before loading?
Last modified: 2012-08-15 13:12:02 UTC
It looks like as memory is not cleaned before loading. Transparent pixels show some artifacts from "old" memory pieces!
I don't have a development environment set up to test the Quartz backend so I can't test it. I've just written this patch blind which might help. It would be great if you could test it.
Created attachment 219085 [details] [review] bitmap: Use the 'copy' blend mode when loading images on Quartz When loading images on Quartz, the image is rendered into a bitmap context using a buffer allocated with _cogl_bitmap_new_with_malloc_buffer. However this buffer is not initialised and by default Quartz will blend the source image with the destination so if there are transparent parts in the source image it will leave garbage in the destination. This patch changes the blend mode to 'copy' so that it won't try to blend. Before 5b785dd4 the buffer was cleared because it was allocated with g_malloc0 so it was working in that case. Presumably it should be more efficient to disable blending and avoid the clear though.
As far as I remember Roland reported that the patch works on IRC so I've pushed it to master as 5ba7f4e6837a. Thanks!