diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-02-01 01:00:31 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-02-01 01:00:31 +0000 |
commit | c604fbe05cfad7b054bc8a45fbcaaa4c33cf14d1 (patch) | |
tree | 0feb142bb75cae11f0acf58aaec59b8e280c75e1 /image/gifread.c | |
parent | fd04e82e9b31d0ad53b0fb2fde395600af1205c1 (diff) | |
download | netsurf-c604fbe05cfad7b054bc8a45fbcaaa4c33cf14d1.tar.gz netsurf-c604fbe05cfad7b054bc8a45fbcaaa4c33cf14d1.tar.bz2 |
[project @ 2005-02-01 01:00:31 by rjw]
Move clipping area cascading to redraw loop (stops progressive decoding having a negative effect.)
svn path=/import/netsurf/; revision=1478
Diffstat (limited to 'image/gifread.c')
-rw-r--r-- | image/gifread.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/image/gifread.c b/image/gifread.c index a7d07e319..f4dbeb665 100644 --- a/image/gifread.c +++ b/image/gifread.c @@ -108,7 +108,6 @@ int gif_initialise(struct gif_animation *gif) { unsigned char *gif_data; unsigned int index; int return_value; - unsigned int frame; /* Check for sufficient data to be a GIF */ @@ -244,44 +243,6 @@ int gif_initialise(struct gif_animation *gif) { */ while ((return_value = gif_initialise_frame(gif)) == 0); - /* Update the redraw areas now we know the full data set - */ - if (gif->frame_count_partial > 0) { - /* We now work backwards to update the redraw characteristics of frames - with clear codes to stop a snowball effect of the redraw areas. It doesn't - really make much difference for most images, and will not work as well - (ie will not optimise as well as for a single-pass call, but still works) - for multiple calls to this routine when decoding progressively. - */ - for (frame = gif->frame_count_partial - 1; frame > 0; frame--) { - if (gif->frames[frame - 1].redraw_required) { - if (gif->frames[frame].redraw_x > gif->frames[frame - 1].redraw_x) { - gif->frames[frame].redraw_width += - (gif->frames[frame].redraw_x - gif->frames[frame - 1].redraw_x); - gif->frames[frame].redraw_x = gif->frames[frame - 1].redraw_x; - } - if (gif->frames[frame].redraw_y > gif->frames[frame - 1].redraw_y) { - gif->frames[frame].redraw_height += - (gif->frames[frame].redraw_y - gif->frames[frame - 1].redraw_y); - gif->frames[frame].redraw_y = gif->frames[frame - 1].redraw_y; - } - if ((gif->frames[frame - 1].redraw_x + gif->frames[frame - 1].redraw_width) > - (gif->frames[frame].redraw_x + gif->frames[frame].redraw_width)) { - gif->frames[frame].redraw_width = - (gif->frames[frame - 1].redraw_x + gif->frames[frame - 1].redraw_width) - - gif->frames[frame].redraw_x; - } - if ((gif->frames[frame - 1].redraw_y + gif->frames[frame - 1].redraw_height) > - (gif->frames[frame].redraw_y + gif->frames[frame].redraw_height)) { - gif->frames[frame].redraw_height = - (gif->frames[frame - 1].redraw_y + gif->frames[frame - 1].redraw_height) - - gif->frames[frame].redraw_y; - } - } - } - - } - /* If there was a memory error tell the caller */ if ((return_value == GIF_INSUFFICIENT_MEMORY) || |