From 60c220635a19b1c907d9a4de71da8f6ca4121874 Mon Sep 17 00:00:00 2001 From: Sean Fox Date: Thu, 26 Jun 2008 02:46:39 +0000 Subject: Removed unnecessary dirty_frame member of gif_animation struct; made unnecessary by correct frame disposal handling svn path=/branches/dynis/libnsgif/; revision=4448 --- libnsgif.c | 18 +----------------- libnsgif.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/libnsgif.c b/libnsgif.c index 502844f..1580e5e 100644 --- a/libnsgif.c +++ b/libnsgif.c @@ -229,7 +229,6 @@ gif_result gif_initialise(struct gif_animation *gif, gif_bitmap_callback_vt *bit gif->colour_table_size = (2 << (gif_data[4] & GIF_COLOUR_TABLE_SIZE_MASK)); gif->background_colour = gif_data[5]; gif->aspect_ratio = gif_data[6]; - gif->dirty_frame = GIF_INVALID_FRAME; gif->loop_count = 1; gif_data += 7; @@ -726,20 +725,6 @@ gif_result gif_decode_frame(struct gif_animation *gif, unsigned int frame, gif_b if ((!clear_image) && ((int)frame == gif->decoded_frame)) return GIF_OK; - /* If the previous frame was dirty, remove it - */ - if (!clear_image) { - if (frame == 0) - gif->dirty_frame = GIF_INVALID_FRAME; - if (gif->decoded_frame == gif->dirty_frame) { - clear_image = true; - if (frame != 0) - gif_decode_frame(gif, gif->dirty_frame, bitmap_callbacks); - clear_image = false; - } - gif->dirty_frame = GIF_INVALID_FRAME; - } - /* Get the start of our frame data and the end of the GIF data */ gif_data = gif->gif_data + gif->frames[frame].frame_pointer; @@ -822,8 +807,7 @@ gif_result gif_decode_frame(struct gif_animation *gif, unsigned int frame, gif_b colour_table = gif->local_colour_table; if (!clear_image) { for (index = 0; index < colour_table_size; index++) { - char colour[] = {gif_data[0], gif_data[1], - gif_data[2], (char)0xff}; + char colour[] = {gif_data[0], gif_data[1], gif_data[2], (char)0xff}; colour_table[index] = *((int *) colour); gif_data += 3; } diff --git a/libnsgif.h b/libnsgif.h index 7c32d9f..b018c20 100644 --- a/libnsgif.h +++ b/libnsgif.h @@ -97,7 +97,6 @@ typedef struct gif_animation { bool global_colours; /**< whether the GIF has a global colour table */ unsigned int *global_colour_table; /**< global colour table */ unsigned int *local_colour_table; /**< local colour table */ - int dirty_frame; /**< the current dirty frame, or -1 for none */ void *frame_image; /**< currently decoded image; stored as bitmap from bitmap_create callback */ gif_result current_error; /**< current error type, or 0 for none*/ } gif_animation; -- cgit v1.2.3