diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-07 00:20:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-07 00:20:35 +0100 |
commit | d56ea7a852d7090360fe080acec268de55ee908d (patch) | |
tree | 3257315dbb35fd85660d82045e57f89d0d7e556b /uxa/uxa-priv.h | |
parent | 8700673157fdd3a87ad5150f2f30823261fec519 (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-priv.h')
-rw-r--r-- | uxa/uxa-priv.h | 7 |
1 files changed, 5 insertions, 2 deletions
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 */ |