[PATCH 11/15] xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API)
Dave Airlie
airlied at gmail.com
Tue Apr 10 07:47:42 PDT 2012
This migrates the ChangeGamma interface to avoid passing a index.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/xfree86/common/xf86cmap.c | 5 ++---
hw/xfree86/common/xf86str.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 07b8af5..759b4e0 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -121,7 +121,7 @@ static Bool CMapSwitchMode(ScrnInfoPtr, DisplayModePtr, int);
#ifdef XFreeXDGA
static int CMapSetDGAMode(int, int, DGADevicePtr);
#endif
-static int CMapChangeGamma(int, Gamma);
+static int CMapChangeGamma(ScrnInfoPtr, Gamma);
static void ComputeGamma(CMapScreenPtr);
static Bool CMapAllocateColormapPrivate(ColormapPtr);
@@ -907,10 +907,9 @@ ComputeGamma(CMapScreenPtr priv)
}
int
-CMapChangeGamma(int index, Gamma gamma)
+CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
{
int ret = Success;
- ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = pScrn->pScreen;
CMapColormapPtr pColPriv;
CMapScreenPtr pScreenPriv;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 62530c2..2ba5d6f 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -639,7 +639,7 @@ typedef void xf86FreeScreenProc(ScrnInfoPtr, int);
typedef ModeStatus xf86ValidModeProc(ScrnInfoPtr, DisplayModePtr, Bool, int);
typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr, Bool);
typedef int xf86SetDGAModeProc(int, int, DGADevicePtr);
-typedef int xf86ChangeGammaProc(int, Gamma);
+typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma);
typedef void xf86PointerMovedProc(int, int, int);
typedef Bool xf86PMEventProc(int, pmEvent, Bool);
typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int);
--
1.7.9.3
More information about the xorg-devel
mailing list