From 3d9a1198db571973e2760d6f27c771cbe31c844b Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 22 Feb 2006 01:58:19 +0000 Subject: [project @ 2006-02-22 01:58:19 by rjw] Reduce constant bitmap overhead per reference by moving to a flag word. Allow bitmaps to be reduced back to their raw data to free extra memory in a highly efficient manner. svn path=/import/netsurf/; revision=2089 --- image/gifread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'image/gifread.c') diff --git a/image/gifread.c b/image/gifread.c index ba26452d8..9d81bb6a7 100644 --- a/image/gifread.c +++ b/image/gifread.c @@ -204,7 +204,7 @@ int gif_initialise(struct gif_animation *gif) { /* Initialise the sprite header */ - if ((gif->frame_image = bitmap_create(gif->width, gif->height, BITMAP_ALLOCATE_MEMORY)) == NULL) { + if ((gif->frame_image = bitmap_create(gif->width, gif->height, BITMAP_NEW)) == NULL) { gif_finalise(gif); return GIF_INSUFFICIENT_MEMORY; } @@ -283,7 +283,7 @@ static int gif_initialise_sprite(struct gif_animation *gif, unsigned int width, /* Allocate some more memory */ - if ((buffer = bitmap_create(max_width, max_height, BITMAP_ALLOCATE_MEMORY)) == NULL) + if ((buffer = bitmap_create(max_width, max_height, BITMAP_NEW)) == NULL) return GIF_INSUFFICIENT_MEMORY; bitmap_destroy(gif->frame_image); gif->frame_image = buffer; -- cgit v1.2.3