mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 22:09:43 +03:00
Fix memory leak and make freeing bitmaps that might be cached a little safer.
svn path=/trunk/netsurf/; revision=6620
This commit is contained in:
parent
781405d195
commit
10d3cff743
@ -402,6 +402,11 @@ bool ami_bitmap(int x, int y, int width, int height,
|
||||
BLITA_UseSrcAlpha,!bitmap->opaque,
|
||||
TAG_DONE);
|
||||
|
||||
if(tbm != bitmap->nativebm)
|
||||
{
|
||||
p96FreeBitMap(tbm);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -413,11 +418,6 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
|
||||
int max_width,max_height;
|
||||
struct BitMap *tbm = NULL;
|
||||
|
||||
/*
|
||||
SetRPAttrs(currp,RPTAG_BPenColor,p96EncodeColor(RGBFB_A8B8G8R8,bg),
|
||||
TAG_DONE);
|
||||
*/
|
||||
|
||||
if(!(repeat_x || repeat_y))
|
||||
return ami_bitmap(x, y, width, height, bitmap, bg, content);
|
||||
|
||||
@ -457,7 +457,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
|
||||
break;
|
||||
}
|
||||
|
||||
if(!option_cache_bitmaps)
|
||||
if(tbm != bitmap->nativebm)
|
||||
{
|
||||
p96FreeBitMap(tbm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user