raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f56e33f429cfc165a5a7e7c75c5b2271ba8b58d8
commit f56e33f429cfc165a5a7e7c75c5b2271ba8b58d8 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Sat Apr 2 13:22:11 2016 +0900 evas - gif loader - be a little more optimal in pixel lookups on decode --- src/modules/evas/image_loaders/gif/evas_image_load_gif.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c index 5110158..09d3b27 100644 --- a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c +++ b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c @@ -213,6 +213,7 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin, int intjump[] = { 8, 8, 4, 2 }; int i, xx, yy, pix; GifRowType *rows; + GifPixelType *pixels; Eina_Bool ret = EINA_FALSE; ColorMapObject *cmap; DATA32 *p; @@ -270,10 +271,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin, { for (yy = 0; yy < h; yy++) { + pixels = &(PIX(0, yy)); p = data + ((y + yy) * rowpix) + x; for (xx = 0; xx < w; xx++) { - pix = PIX(xx, yy); + pix = *pixels; + pixels++; if (pix != transparent) *p = PIXLK(pix); else *p = 0; p++; @@ -285,10 +288,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin, { for (yy = 0; yy < h; yy++) { + pixels = &(PIX(0, yy)); p = data + ((y + yy) * rowpix) + x; for (xx = 0; xx < w; xx++) { - pix = PIX(xx, yy); + pix = *pixels; + pixels++; if (pix != transparent) *p = PIXLK(pix); p++; } @@ -300,10 +305,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin, // walk pixels without worring about transparency at all for (yy = 0; yy < h; yy++) { + pixels = &(PIX(0, yy)); p = data + ((y + yy) * rowpix) + x; for (xx = 0; xx < w; xx++) { - pix = PIX(xx, yy); + pix = *pixels; + pixels++; *p = PIXLK(pix); p++; } --
