summaryrefslogtreecommitdiff
path: root/image/gif.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-02-01 16:55:11 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-02-01 16:55:11 +0000
commit82e4286c5fc39e0f0138732f364667bd754894e0 (patch)
tree08dc8d5c5968e86fbe90674b8511d1d8d93ca1ac /image/gif.c
parente86bbdfc7939ec562a33c4aea50904b18a77bfb8 (diff)
downloadnetsurf-82e4286c5fc39e0f0138732f364667bd754894e0.tar.gz
netsurf-82e4286c5fc39e0f0138732f364667bd754894e0.tar.bz2
[project @ 2005-02-01 16:55:11 by rjw]
Animate broken GIFs with frame delays of 0. svn path=/import/netsurf/; revision=1480
Diffstat (limited to 'image/gif.c')
-rw-r--r--image/gif.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/image/gif.c b/image/gif.c
index 43eaf8977..ca77e2b36 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -186,7 +186,7 @@ void nsgif_animate(void *p)
/* A loop count of 0 has a special meaning of infinite
*/
- if (c->data.gif.gif->loop_count != 0) {
+ if (gif->loop_count != 0) {
gif->loop_count--;
if (gif->loop_count == 0) {
c->data.gif.current_frame = gif->frame_count_partial - 1;
@@ -197,7 +197,7 @@ void nsgif_animate(void *p)
/* Continue animating if we should
*/
- if (c->data.gif.gif->loop_count >= 0) {
+ if (gif->loop_count >= 0) {
delay = gif->frames[c->data.gif.current_frame].frame_delay;
if (delay < option_minimum_gif_delay)
delay = option_minimum_gif_delay;
@@ -239,15 +239,15 @@ void nsgif_animate(void *p)
} else {
/* do advanced check */
if ((data.redraw.x == 0) && (data.redraw.y == 0) &&
- (data.redraw.width == c->data.gif.gif->width) &&
- (data.redraw.height == c->data.gif.gif->height)) {
- data.redraw.full_redraw = !bitmap_get_opaque(c->data.gif.gif->frame_image);
- } else {
+ (data.redraw.width == gif->width) &&
+ (data.redraw.height == gif->height)) {
+ data.redraw.full_redraw = !gif->frames[f].opaque;
+ } else {
data.redraw.full_redraw = true;
data.redraw.x = 0;
data.redraw.y = 0;
- data.redraw.width = c->data.gif.gif->width;
- data.redraw.height = c->data.gif.gif->height;
+ data.redraw.width = gif->width;
+ data.redraw.height = gif->height;
}
}