[PATCH] shadow: Optimize shadowUpdatePacked(). (#26973)

Corbin Simpson mostawesomedude at gmail.com
Thu Apr 8 04:21:27 PDT 2010


From: Ilpo Ruotsalainen <ilpo.ruotsalainen at movial.fi>

v2: Also remove the very very last reference to PickBits, and handle
some pointer maths.

Signed-off-by: Corbin Simpson <MostAwesomeDude at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
 miext/shadow/shpacked.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c
index 6736162..6339a80 100644
--- a/miext/shadow/shpacked.c
+++ b/miext/shadow/shpacked.c
@@ -101,9 +101,8 @@ shadowUpdatePacked (ScreenPtr	    pScreen,
 		    i = width;
 		width -= i;
 		scr += i;
-#define PickBit(a,i)	(((a) >> (i)) & 1)
-		while (i--)
-		    *win++ = *sha++;
+		memcpy(win, sha, i * sizeof(FbBits));
+		sha += i;
 	    }
 	    shaLine += shaStride;
 	    y++;
-- 
1.6.6.1



More information about the xorg-devel mailing list