From d56ea7a852d7090360fe080acec268de55ee908d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 7 Jun 2010 00:20:35 +0100 Subject: Use the direct dixGevPrivate() API when available This is quicker and smaller than the old indirect function call to dixLookupPrivate(). Signed-off-by: Chris Wilson --- uxa/uxa-priv.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'uxa') diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h index 47b62d4f..626823f8 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -174,8 +174,11 @@ extern int uxa_screen_index; static inline uxa_screen_t *uxa_get_screen(ScreenPtr screen) { - return (uxa_screen_t *) dixLookupPrivate(&screen->devPrivates, - &uxa_screen_index); +#if HAS_DEVPRIVATEKEYREC + return dixGetPrivate(&screen->devPrivates, &uxa_screen_index); +#else + return dixLookupPrivate(&screen->devPrivates, &uxa_screen_index); +#endif } /** Align an offset to an arbitrary alignment */ -- cgit v1.2.3