bitmap: Use the 'copy' blend mode when loading images on Quartz
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.

https://bugzilla.gnome.org/show_bug.cgi?id=680124

Reviewed-by: Robert Bragg <12e9293ec6b30c7fa8a0926af42807e929c1684f@linux.intel.com>

djdeath/cogl,gcampax/cogl,gcampax/cogl,djdeath/cogl-android,gcampax/cogl,djdeath/cogl-android,djdeath/cogl-android,gcampax/cogl,djdeath/cogl,djdeath/cogl