[PATCH 2/4] xaa: convert pScrn->pScreen to use accessor.

Dave Airlie airlied at gmail.com
Mon May 14 05:00:21 PDT 2012


This uses a standard conversion function to do the conversion.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/xaa/xaaInit.c   |    2 +-
 hw/xfree86/xaa/xaaPCache.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 9a5d3fb..48d0605 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -92,7 +92,7 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec)
         return;
 
     if (infoRec->ClosePixmapCache)
-        (*infoRec->ClosePixmapCache) (infoRec->pScrn->pScreen);
+        (*infoRec->ClosePixmapCache) (xf86ScrnToScreen(infoRec->pScrn));
 
     free(infoRec->PreAllocMem);
 
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index a168ceb..53460b3 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -2015,7 +2015,7 @@ XAAWriteBitmapToCacheLinear(ScrnInfoPtr pScrn,
                             int x, int y, int w, int h,
                             unsigned char *src, int srcwidth, int fg, int bg)
 {
-    ScreenPtr pScreen = pScrn->pScreen;
+    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
     PixmapPtr pScreenPix, pDstPix;
     ChangeGCVal gcvals[2];
     GCPtr pGC;
@@ -2061,7 +2061,7 @@ XAAWritePixmapToCacheLinear(ScrnInfoPtr pScrn,
                             unsigned char *src,
                             int srcwidth, int bpp, int depth)
 {
-    ScreenPtr pScreen = pScrn->pScreen;
+    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
     PixmapPtr pScreenPix, pDstPix;
     GCPtr pGC;
 
-- 
1.7.6



More information about the xorg-devel mailing list