summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri/dri.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-04-10 15:47:33 +0100
committerDave Airlie <airlied@redhat.com>2012-05-21 12:59:08 +0100
commit41151f88a62f01b00c1912822b8b430df1eb307e (patch)
tree05e6e63e1d5ece45b5a37c3dc049d6d82351acb5 /hw/xfree86/dri/dri.c
parent53932b3803fa2c02949fd7d4d0e433ea58fa89f1 (diff)
xf86: migrate to using xf86ScreenToScrn wrapper (v2)
migrate to new helper API. This just wraps all the obvious uses of xf86Screens[pScreen->myNum], and should be fairly simple to review. v2: remove commented out lines. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw/xfree86/dri/dri.c')
-rw-r--r--hw/xfree86/dri/dri.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 9530eb40e..20eb683ad 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -315,7 +315,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
int reserved_count;
int i;
DRIEntPrivPtr pDRIEntPriv;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
DRIContextFlags flags = 0;
DRIContextPrivPtr pDRIContextPriv;
@@ -615,7 +615,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pScreen->ClipNotify = pDRIInfo->wrap.ClipNotify;
}
if (pDRIInfo->wrap.AdjustFrame) {
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame;
pScrn->AdjustFrame = pDRIInfo->wrap.AdjustFrame;
@@ -634,7 +634,7 @@ DRICloseScreen(ScreenPtr pScreen)
DRIInfoPtr pDRIInfo;
drm_context_t *reserved;
int reserved_count;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
DRIEntPrivPtr pDRIEntPriv = DRI_ENT_PRIV(pScrn);
Bool closeMaster;
@@ -672,7 +672,7 @@ DRICloseScreen(ScreenPtr pScreen)
pDRIPriv->wrap.ClipNotify = NULL;
}
if (pDRIInfo->wrap.AdjustFrame) {
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame;
pDRIPriv->wrap.AdjustFrame = NULL;
@@ -2311,7 +2311,7 @@ DRIAdjustFrame(int scrnIndex, int x, int y, int flags)
{
ScreenPtr pScreen = screenInfo.screens[scrnIndex];
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int px, py;
if (!pDRIPriv || !pDRIPriv->pSAREA) {