summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-12-10 17:04:10 +1300
committerRobert Ancell <robert.ancell@canonical.com>2019-07-29 16:27:21 -0400
commit255ce3aa2243c993011db60130dc71daa92bd572 (patch)
treec000d6847267a83092406fa093e3815ddf66ccbb /gdk-pixbuf
parente2a6f6401b11f08c31662c17be26d340effe89b5 (diff)
downloadgdk-pixbuf-255ce3aa2243c993011db60130dc71daa92bd572.tar.gz
gif: Remove unused variable
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/io-gif-animation.c24
-rw-r--r--gdk-pixbuf/io-gif-animation.h1
2 files changed, 10 insertions, 15 deletions
diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c
index 2befadf84..971801ee8 100644
--- a/gdk-pixbuf/io-gif-animation.c
+++ b/gdk-pixbuf/io-gif-animation.c
@@ -285,21 +285,17 @@ gdk_pixbuf_gif_anim_iter_advance (GdkPixbufAnimationIter *anim_iter,
* and subtract time for that.
*/
- if (iter->gif_anim->loading)
- loop = 0;
- else {
- /* If current_frame is NULL at this point, we have loaded the
- * animation from a source which fell behind the speed of the
- * display. We remember how much slower the first loop was due
- * to this and correct the position calculation in order to not
- * jump in the middle of the second loop.
- */
- if (iter->current_frame == NULL)
- iter->first_loop_slowness = MAX(0, elapsed - iter->gif_anim->total_time);
+ /* If current_frame is NULL at this point, we have loaded the
+ * animation from a source which fell behind the speed of the
+ * display. We remember how much slower the first loop was due
+ * to this and correct the position calculation in order to not
+ * jump in the middle of the second loop.
+ */
+ if (iter->current_frame == NULL)
+ iter->first_loop_slowness = MAX(0, elapsed - iter->gif_anim->total_time);
- loop = (elapsed - iter->first_loop_slowness) / iter->gif_anim->total_time;
- elapsed = (elapsed - iter->first_loop_slowness) % iter->gif_anim->total_time;
- }
+ loop = (elapsed - iter->first_loop_slowness) / iter->gif_anim->total_time;
+ elapsed = (elapsed - iter->first_loop_slowness) % iter->gif_anim->total_time;
iter->position = elapsed;
diff --git a/gdk-pixbuf/io-gif-animation.h b/gdk-pixbuf/io-gif-animation.h
index 1ea893eda..b0ef809f5 100644
--- a/gdk-pixbuf/io-gif-animation.h
+++ b/gdk-pixbuf/io-gif-animation.h
@@ -76,7 +76,6 @@ struct _GdkPixbufGifAnim {
guchar bg_blue;
int loop;
- gboolean loading;
};
struct _GdkPixbufGifAnimClass {