xf86-video-intel: src/i830.h uxa/uxa-priv.h

Chris Wilson ickle at kemper.freedesktop.org
Sun Jun 6 16:23:17 PDT 2010


 src/i830.h     |    4 ++++
 uxa/uxa-priv.h |    7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit d56ea7a852d7090360fe080acec268de55ee908d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 7 00:20:35 2010 +0100

    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 at chris-wilson.co.uk>

diff --git a/src/i830.h b/src/i830.h
index ea4f2c4..4e24c77 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -162,7 +162,11 @@ extern int uxa_pixmap_index;
 
 static inline struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap)
 {
+#if HAS_DEVPRIVATEKEYREC
+	return dixGetPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
+#else
 	return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
+#endif
 }
 
 static inline void i830_set_pixmap_intel(PixmapPtr pixmap, struct intel_pixmap *intel)
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index 47b62d4..626823f 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 */


More information about the xorg-commit mailing list