Clear new bitmaps to transparent black on creation of gtk bitmaps.

svn path=/trunk/netsurf/; revision=3439
This commit is contained in:
Rob Kendrick 2007-07-19 00:12:35 +00:00
parent 8aa4b9e7b3
commit 2370e4c6a0

View File

@ -49,6 +49,11 @@ struct bitmap *bitmap_create(int width, int height, unsigned int state)
bmp->primary = gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8,
width, height);
/* fill the pixbuf in with 100% transparent black, as the memory
* won't have been cleared.
*/
gdk_pixbuf_fill(bmp->primary, 0);
bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL;
return bmp;
}