mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
Don't clear bitmap structure on allocation
This commit is contained in:
parent
b41685208f
commit
5a58e844e4
@ -49,16 +49,21 @@ void *amiga_bitmap_create(int width, int height, unsigned int state)
|
||||
{
|
||||
struct bitmap *bitmap;
|
||||
|
||||
bitmap = ami_misc_allocvec_clear(sizeof(struct bitmap), 0);
|
||||
if(bitmap)
|
||||
{
|
||||
bitmap->pixdata = ami_misc_allocvec_clear(width*height*4, 0xff);
|
||||
bitmap->width = width;
|
||||
bitmap->height = height;
|
||||
bitmap = AllocVecTagList(sizeof(struct bitmap), NULL);
|
||||
if(bitmap == NULL) return NULL;
|
||||
|
||||
if(state & BITMAP_OPAQUE) bitmap->opaque = true;
|
||||
else bitmap->opaque = false;
|
||||
}
|
||||
bitmap->pixdata = ami_misc_allocvec_clear(width*height*4, 0xff);
|
||||
bitmap->width = width;
|
||||
bitmap->height = height;
|
||||
|
||||
if(state & BITMAP_OPAQUE) bitmap->opaque = true;
|
||||
else bitmap->opaque = false;
|
||||
|
||||
bitmap->nativebm = NULL;
|
||||
bitmap->nativebmwidth = 0;
|
||||
bitmap->nativebmheight = 0;
|
||||
bitmap->native_mask = NULL;
|
||||
bitmap->dto = NULL;
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user