diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-01-24 23:42:28 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-01-24 23:42:28 +0000 |
commit | 443818ff07a1629b7f9576a1c98872b366bb6a95 (patch) | |
tree | 3746fb20e151c9ba743caadc2fb45f302f9f738d /render/html_redraw.c | |
parent | 5157c9c280ca1fc1d66d0b4828d828ace9b9d630 (diff) | |
download | netsurf-443818ff07a1629b7f9576a1c98872b366bb6a95.tar.gz netsurf-443818ff07a1629b7f9576a1c98872b366bb6a95.tar.bz2 |
[project @ 2006-01-24 23:42:28 by rjw]
Manually decode GIFs used as backgrounds.
svn path=/import/netsurf/; revision=2034
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r-- | render/html_redraw.c | 6 |
1 files changed, 6 insertions, 0 deletions
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), |