[MPlayer-cvslog] r37091 - trunk/gui/ui/render.c

ib subversion at mplayerhq.hu
Thu Mar 27 14:43:19 CET 2014


Author: ib
Date: Thu Mar 27 14:43:19 2014
New Revision: 37091

Log:
Activate the #else part of the conditional directive.

This code should be faster.

Modified:
   trunk/gui/ui/render.c

Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c	Thu Mar 27 14:09:44 2014	(r37090)
+++ trunk/gui/ui/render.c	Thu Mar 27 14:43:19 2014	(r37091)
@@ -361,9 +361,7 @@ static void PutImage(guiImage *img, int 
 {
     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 @@ static void PutImage(guiImage *img, int 
     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 @@ static void PutImage(guiImage *img, int 
 
         yc += drawbuf_width;
     }
-#endif
 }
 
 static void SinglePhasePutImage(guiImage *bf, int x, int y, float frac)


More information about the MPlayer-cvslog mailing list