changeset 36995:efec4d517450

Activate the #else part of the conditional directive. This code should be faster.
author ib
date Thu, 27 Mar 2014 13:43:19 +0000
parents 167442bc79d0
children a17b55521dd2
files gui/ui/render.c
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/render.c	Thu Mar 27 13:09:44 2014 +0000
+++ b/gui/ui/render.c	Thu Mar 27 13:43:19 2014 +0000
@@ -361,9 +361,7 @@
 {
     int i, ix, iy;
     uint32_t *pixels, *drawbuf;
-    register uint32_t pixel;
-
-    /* register uint32_t yc; */
+    register uint32_t yc, pixel;
 
     if (!img || (img->Image == NULL))
         return;
@@ -372,15 +370,6 @@
     drawbuf = (uint32_t *)image_buffer;
     pixels  = (uint32_t *)img->Image;
 
-#if 1
-    for (iy = y; iy < (int)(y + img->Height / parts); iy++)
-        for (ix = x; ix < (int)(x + img->Width); ix++) {
-            pixel = pixels[i++];
-
-            if (!IS_TRANSPARENT(pixel))
-                drawbuf[iy * drawbuf_width + ix] = pixel;
-        }
-#else
     yc = y * drawbuf_width;
 
     for (iy = y; iy < (int)(y + img->Height / parts); iy++) {
@@ -393,7 +382,6 @@
 
         yc += drawbuf_width;
     }
-#endif
 }
 
 static void SinglePhasePutImage(guiImage *bf, int x, int y, float frac)