From 2370e4c6a03be93a5c7e493562086d6e69704a38 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Thu, 19 Jul 2007 00:12:35 +0000 Subject: Clear new bitmaps to transparent black on creation of gtk bitmaps. svn path=/trunk/netsurf/; revision=3439 --- gtk/gtk_bitmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk/gtk_bitmap.c b/gtk/gtk_bitmap.c index f48d480f1..4701a7b5d 100644 --- a/gtk/gtk_bitmap.c +++ b/gtk/gtk_bitmap.c @@ -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; } -- cgit v1.2.3