summaryrefslogtreecommitdiff
path: root/image/gif.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-03-08 14:13:27 +0000
committerVincent Sanders <vince@kyllikki.org>2014-03-09 15:37:40 +0000
commit87f6314dabdc2067a19e01f8b29f9ecc38ed825b (patch)
tree78f8f8395e3bf3b7ee2c18a7b5a5e6d2d5ca9ddc /image/gif.c
parentfb9b171e325488dc9792ee0f3062f15d8ec597ee (diff)
downloadnetsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.gz
netsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.bz2
move scheduleing into browser operation table
Diffstat (limited to 'image/gif.c')
-rw-r--r--image/gif.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/image/gif.c b/image/gif.c
index 4bd45c7fe..5c1b3abe8 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -39,14 +39,15 @@
#include "content/hlcache.h"
#include "utils/nsoption.h"
#include "desktop/plotters.h"
-#include "image/image.h"
-#include "image/bitmap.h"
-#include "image/gif.h"
+#include "desktop/gui_factory.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/schedule.h"
#include "utils/utils.h"
+#include "image/image.h"
+#include "image/bitmap.h"
+#include "image/gif.h"
+
typedef struct nsgif_content {
struct content base;
@@ -159,7 +160,7 @@ static void nsgif_animate(void *p)
delay = gif->gif->frames[gif->current_frame].frame_delay;
if (delay < nsoption_int(minimum_gif_delay))
delay = nsoption_int(minimum_gif_delay);
- schedule(delay, nsgif_animate, gif);
+ guit->browser->schedule(delay * 10, nsgif_animate, gif);
}
if ((!nsoption_bool(animate_images)) ||
@@ -292,7 +293,9 @@ static bool nsgif_convert(struct content *c)
/* Schedule the animation if we have one */
gif->current_frame = 0;
if (gif->gif->frame_count_partial > 1)
- schedule(gif->gif->frames[0].frame_delay, nsgif_animate, c);
+ guit->browser->schedule(gif->gif->frames[0].frame_delay * 10,
+ nsgif_animate,
+ c);
/* Exit as a success */
content_set_ready(c);
@@ -351,7 +354,7 @@ static void nsgif_destroy(struct content *c)
nsgif_content *gif = (nsgif_content *) c;
/* Free all the associated memory buffers */
- schedule_remove(nsgif_animate, c);
+ guit->browser->schedule(-1, nsgif_animate, c);
gif_finalise(gif->gif);
free(gif->gif);
}