kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=1efd42161484bafc7dd6174c5a97e190c573dd2a

commit 1efd42161484bafc7dd6174c5a97e190c573dd2a
Author: Kim Woelders <k...@woelders.dk>
Date:   Sun Apr 3 19:43:38 2016 +0200

    GIF loader: Reduce progress checks from per-pixel to per-row.
    
    Patch by Yuriy M. Kaminskiy.
---
 src/modules/loaders/loader_gif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
index b3d0612..388cfaf 100644
--- a/src/modules/loaders/loader_gif.c
+++ b/src/modules/loaders/loader_gif.c
@@ -164,12 +164,13 @@ load(ImlibImage * im, ImlibProgressFunction progress, 
char progress_granularity,
            goto quit;
 
         ptr = im->data;
-        per_inc = 100.0 / (((float)w) * h);
+        per_inc = 100.0 / (float)h;
         for (i = 0; i < h; i++)
           {
              for (j = 0; j < w; j++)
                {
                   *ptr++ = colormap[rows[i][j]];
+               }
                   per += per_inc;
                   if (progress && (((int)per) != last_per)
                       && (((int)per) % progress_granularity == 0))
@@ -182,7 +183,6 @@ load(ImlibImage * im, ImlibProgressFunction progress, char 
progress_granularity,
                          }
                        last_y = i;
                     }
-               }
           }
 
       finish:

-- 


Reply via email to