From 443818ff07a1629b7f9576a1c98872b366bb6a95 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Tue, 24 Jan 2006 23:42:28 +0000 Subject: [project @ 2006-01-24 23:42:28 by rjw] Manually decode GIFs used as backgrounds. svn path=/import/netsurf/; revision=2034 --- render/html_redraw.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'render') diff --git a/render/html_redraw.c b/render/html_redraw.c index 2d528fe31..9346445c1 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -1022,6 +1022,12 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, if (plot_bitmap) { if (!plot.clip(clip_x0, clip_y0, clip_x1, clip_y1)) return false; + /* SPECIAL CASE: As GIFs are normally decoded on the first call to + * nsgif_redraw we may need to get the first frame manually. */ + if ((box->background->type == CONTENT_GIF) && + (box->background->data.gif.gif->decoded_frame < 0)) + gif_decode_frame(box->background->data.gif.gif, + 0); if (!plot.bitmap_tile(x, y, ceilf(box->background->width * scale), ceilf(box->background->height * scale), -- cgit v1.2.3