summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2007-07-19 00:12:35 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2007-07-19 00:12:35 +0000
commit2370e4c6a03be93a5c7e493562086d6e69704a38 (patch)
tree6281fac8e28e4058467f73648e98a2435ca015be /gtk
parent8aa4b9e7b3828d04785f9d444b75d0f9f0374167 (diff)
downloadnetsurf-2370e4c6a03be93a5c7e493562086d6e69704a38.tar.gz
netsurf-2370e4c6a03be93a5c7e493562086d6e69704a38.tar.bz2
Clear new bitmaps to transparent black on creation of gtk bitmaps.
svn path=/trunk/netsurf/; revision=3439
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_bitmap.c5
1 files changed, 5 insertions, 0 deletions
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;
}