[PATCH 18/22] shadow: Use shared NoopDDA to utilize code cache better

Pauli ext-pauli.nieminen at nokia.com
Wed Dec 29 11:27:30 PST 2010


From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

Calling function that is in code cache is order of magnitude faster. In
arm non-cached simple function takes about 1us while cached function
takes max 200ns.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 miext/shadow/shadow.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index cb1b299..266a6f4 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -72,11 +72,6 @@ shadowBlockHandler(pointer data, OSTimePtr pTimeout, pointer pRead)
 }
 
 static void
-shadowWakeupHandler(pointer data, int i, pointer LastSelectMask)
-{
-}
-
-static void
 shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
 	       unsigned int format, unsigned long planeMask, char *pdstLine)
 {
@@ -182,7 +177,7 @@ shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update,
 {
     shadowBuf(pScreen);
 
-    if (!RegisterBlockAndWakeupHandlers(shadowBlockHandler, shadowWakeupHandler,
+    if (!RegisterBlockAndWakeupHandlers(shadowBlockHandler, (WakeupHandlerProcPtr)NoopDDA,
 					(pointer)pScreen))
 	return FALSE;
 
@@ -227,7 +222,7 @@ shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap)
 	pBuf->pPixmap = 0;
     }
 
-    RemoveBlockAndWakeupHandlers(shadowBlockHandler, shadowWakeupHandler,
+    RemoveBlockAndWakeupHandlers(shadowBlockHandler, (WakeupHandlerProcPtr)NoopDDA,
 				 (pointer) pScreen);
 }
 
-- 
1.7.0.4



More information about the xorg-devel mailing list