[PATCH 14/16] xv: Drop the ClientPtr from the interface to the DDX.

Eric Anholt eric at anholt.net
Fri Jul 18 10:32:31 PDT 2014


Nobody was using it.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 Xext/xvdisp.c              |  8 +++-----
 Xext/xvdix.h               | 20 +++++++++----------
 Xext/xvmain.c              | 20 +++++++++----------
 hw/kdrive/src/kxv.c        | 49 +++++++++++++++++++---------------------------
 hw/xfree86/common/xf86xv.c | 49 +++++++++++++++++++---------------------------
 5 files changed, 63 insertions(+), 83 deletions(-)

diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index df128d0..0bdfed3 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -851,8 +851,7 @@ ProcXvPutImage(ClientPtr client)
 
     width = stuff->width;
     height = stuff->height;
-    size = (*pPort->pAdaptor->ddQueryImageAttributes) (client,
-                                                       pPort, pImage, &width,
+    size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width,
                                                        &height, NULL, NULL);
     size += sizeof(xvPutImageReq);
     size = bytes_to_int32(size);
@@ -917,8 +916,7 @@ ProcXvShmPutImage(ClientPtr client)
 
     width = stuff->width;
     height = stuff->height;
-    size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (client,
-                                                              pPort, pImage,
+    size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage,
                                                               &width, &height,
                                                               NULL, NULL);
     if ((size_needed + stuff->offset) > shmdesc->size)
@@ -1002,7 +1000,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
     width = stuff->width;
     height = stuff->height;
 
-    size = (*pPort->pAdaptor->ddQueryImageAttributes) (client, pPort, pImage,
+    size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage,
                                                        &width, &height, offsets,
                                                        pitches);
 
diff --git a/Xext/xvdix.h b/Xext/xvdix.h
index 9bbfcde..e67a3c7 100644
--- a/Xext/xvdix.h
+++ b/Xext/xvdix.h
@@ -157,29 +157,29 @@ typedef struct {
     int nPorts;
     struct _XvPortRec *pPorts;
     ScreenPtr pScreen;
-    int (*ddPutVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+    int (*ddPutVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
                        INT16, INT16, CARD16, CARD16,
                        INT16, INT16, CARD16, CARD16);
-    int (*ddPutStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+    int (*ddPutStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
                        INT16, INT16, CARD16, CARD16,
                        INT16, INT16, CARD16, CARD16);
-    int (*ddGetVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+    int (*ddGetVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
                        INT16, INT16, CARD16, CARD16,
                        INT16, INT16, CARD16, CARD16);
-    int (*ddGetStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+    int (*ddGetStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
                        INT16, INT16, CARD16, CARD16,
                        INT16, INT16, CARD16, CARD16);
-    int (*ddStopVideo) (ClientPtr, struct _XvPortRec *, DrawablePtr);
-    int (*ddSetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32);
-    int (*ddGetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32 *);
-    int (*ddQueryBestSize) (ClientPtr, struct _XvPortRec *, CARD8,
+    int (*ddStopVideo) (struct _XvPortRec *, DrawablePtr);
+    int (*ddSetPortAttribute) (struct _XvPortRec *, Atom, INT32);
+    int (*ddGetPortAttribute) (struct _XvPortRec *, Atom, INT32 *);
+    int (*ddQueryBestSize) (struct _XvPortRec *, CARD8,
                             CARD16, CARD16, CARD16, CARD16,
                             unsigned int *, unsigned int *);
-    int (*ddPutImage) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+    int (*ddPutImage) (DrawablePtr, struct _XvPortRec *, GCPtr,
                        INT16, INT16, CARD16, CARD16,
                        INT16, INT16, CARD16, CARD16,
                        XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
-    int (*ddQueryImageAttributes) (ClientPtr, struct _XvPortRec *, XvImagePtr,
+    int (*ddQueryImageAttributes) (struct _XvPortRec *, XvImagePtr,
                                    CARD16 *, CARD16 *, int *, int *);
     DevUnion devPriv;
 } XvAdaptorRec, *XvAdaptorPtr;
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 782b44e..b75d424 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -356,7 +356,7 @@ XvDestroyPixmap(PixmapPtr pPix)
             if (pp->pDraw == (DrawablePtr) pPix) {
                 XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
 
-                (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw);
+                (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw);
 
                 pp->pDraw = NULL;
                 pp->client = NULL;
@@ -404,7 +404,7 @@ XvDestroyWindow(WindowPtr pWin)
             if (pp->pDraw == (DrawablePtr) pWin) {
                 XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
 
-                (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw);
+                (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw);
 
                 pp->pDraw = NULL;
                 pp->client = NULL;
@@ -566,7 +566,7 @@ XvdiPutVideo(ClientPtr client,
         XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
     }
 
-    (void) (*pPort->pAdaptor->ddPutVideo) (client, pDraw, pPort, pGC,
+    (void) (*pPort->pAdaptor->ddPutVideo) (pDraw, pPort, pGC,
                                            vid_x, vid_y, vid_w, vid_h,
                                            drw_x, drw_y, drw_w, drw_h);
 
@@ -608,7 +608,7 @@ XvdiPutStill(ClientPtr client,
 
     pPort->time = currentTime;
 
-    status = (*pPort->pAdaptor->ddPutStill) (client, pDraw, pPort, pGC,
+    status = (*pPort->pAdaptor->ddPutStill) (pDraw, pPort, pGC,
                                              vid_x, vid_y, vid_w, vid_h,
                                              drw_x, drw_y, drw_w, drw_h);
 
@@ -644,7 +644,7 @@ XvdiPutImage(ClientPtr client,
 
     pPort->time = currentTime;
 
-    return (*pPort->pAdaptor->ddPutImage) (client, pDraw, pPort, pGC,
+    return (*pPort->pAdaptor->ddPutImage) (pDraw, pPort, pGC,
                                            src_x, src_y, src_w, src_h,
                                            drw_x, drw_y, drw_w, drw_h,
                                            image, data, sync, width, height);
@@ -683,7 +683,7 @@ XvdiGetVideo(ClientPtr client,
         XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
     }
 
-    (void) (*pPort->pAdaptor->ddGetVideo) (client, pDraw, pPort, pGC,
+    (void) (*pPort->pAdaptor->ddGetVideo) (pDraw, pPort, pGC,
                                            vid_x, vid_y, vid_w, vid_h,
                                            drw_x, drw_y, drw_w, drw_h);
 
@@ -723,7 +723,7 @@ XvdiGetStill(ClientPtr client,
         return Success;
     }
 
-    status = (*pPort->pAdaptor->ddGetStill) (client, pDraw, pPort, pGC,
+    status = (*pPort->pAdaptor->ddGetStill) (pDraw, pPort, pGC,
                                              vid_x, vid_y, vid_w, vid_h,
                                              drw_x, drw_y, drw_w, drw_h);
 
@@ -955,7 +955,7 @@ XvdiStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw)
 
     XvdiSendVideoNotify(pPort, pDraw, XvStopped);
 
-    status = (*pPort->pAdaptor->ddStopVideo) (client, pPort, pDraw);
+    status = (*pPort->pAdaptor->ddStopVideo) (pPort, pDraw);
 
     pPort->pDraw = NULL;
     pPort->client = (ClientPtr) client;
@@ -998,7 +998,7 @@ XvdiSetPortAttribute(ClientPtr client,
     int status;
 
     status =
-        (*pPort->pAdaptor->ddSetPortAttribute) (client, pPort, attribute,
+        (*pPort->pAdaptor->ddSetPortAttribute) (pPort, attribute,
                                                 value);
     if (status == Success)
         XvdiSendPortNotify(pPort, attribute, value);
@@ -1012,7 +1012,7 @@ XvdiGetPortAttribute(ClientPtr client,
 {
 
     return
-        (*pPort->pAdaptor->ddGetPortAttribute) (client, pPort, attribute,
+        (*pPort->pAdaptor->ddGetPortAttribute) (pPort, attribute,
                                                 p_value);
 
 }
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index f9c18d6..f979e1f 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -58,29 +58,29 @@ of the copyright holder.
 
 /* XvAdaptorRec fields */
 
-static int KdXVPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int KdXVPutVideo(DrawablePtr, XvPortPtr, GCPtr,
                         INT16, INT16, CARD16, CARD16,
                         INT16, INT16, CARD16, CARD16);
-static int KdXVPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int KdXVPutStill(DrawablePtr, XvPortPtr, GCPtr,
                         INT16, INT16, CARD16, CARD16,
                         INT16, INT16, CARD16, CARD16);
-static int KdXVGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int KdXVGetVideo(DrawablePtr, XvPortPtr, GCPtr,
                         INT16, INT16, CARD16, CARD16,
                         INT16, INT16, CARD16, CARD16);
-static int KdXVGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int KdXVGetStill(DrawablePtr, XvPortPtr, GCPtr,
                         INT16, INT16, CARD16, CARD16,
                         INT16, INT16, CARD16, CARD16);
-static int KdXVStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
-static int KdXVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
-static int KdXVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *);
-static int KdXVQueryBestSize(ClientPtr, XvPortPtr, CARD8,
+static int KdXVStopVideo(XvPortPtr, DrawablePtr);
+static int KdXVSetPortAttribute(XvPortPtr, Atom, INT32);
+static int KdXVGetPortAttribute(XvPortPtr, Atom, INT32 *);
+static int KdXVQueryBestSize(XvPortPtr, CARD8,
                              CARD16, CARD16, CARD16, CARD16,
                              unsigned int *, unsigned int *);
-static int KdXVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int KdXVPutImage(DrawablePtr, XvPortPtr, GCPtr,
                         INT16, INT16, CARD16, CARD16,
                         INT16, INT16, CARD16, CARD16,
                         XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
-static int KdXVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr,
+static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr,
                                     CARD16 *, CARD16 *, int *, int *);
 
 /* ScreenRec fields */
@@ -1028,8 +1028,7 @@ KdXVDisable(ScreenPtr pScreen)
 /**** XvAdaptorRec fields ****/
 
 static int
-KdXVPutVideo(ClientPtr client,
-             DrawablePtr pDraw,
+KdXVPutVideo(DrawablePtr pDraw,
              XvPortPtr pPort,
              GCPtr pGC,
              INT16 vid_x, INT16 vid_y,
@@ -1082,8 +1081,7 @@ KdXVPutVideo(ClientPtr client,
 }
 
 static int
-KdXVPutStill(ClientPtr client,
-             DrawablePtr pDraw,
+KdXVPutStill(DrawablePtr pDraw,
              XvPortPtr pPort,
              GCPtr pGC,
              INT16 vid_x, INT16 vid_y,
@@ -1175,8 +1173,7 @@ KdXVPutStill(ClientPtr client,
 }
 
 static int
-KdXVGetVideo(ClientPtr client,
-             DrawablePtr pDraw,
+KdXVGetVideo(DrawablePtr pDraw,
              XvPortPtr pPort,
              GCPtr pGC,
              INT16 vid_x, INT16 vid_y,
@@ -1229,8 +1226,7 @@ KdXVGetVideo(ClientPtr client,
 }
 
 static int
-KdXVGetStill(ClientPtr client,
-             DrawablePtr pDraw,
+KdXVGetStill(DrawablePtr pDraw,
              XvPortPtr pPort,
              GCPtr pGC,
              INT16 vid_x, INT16 vid_y,
@@ -1292,7 +1288,7 @@ KdXVGetStill(ClientPtr client,
 }
 
 static int
-KdXVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw)
+KdXVStopVideo(XvPortPtr pPort, DrawablePtr pDraw)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1318,8 +1314,7 @@ KdXVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw)
 }
 
 static int
-KdXVSetPortAttribute(ClientPtr client,
-                     XvPortPtr pPort, Atom attribute, INT32 value)
+KdXVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1329,8 +1324,7 @@ KdXVSetPortAttribute(ClientPtr client,
 }
 
 static int
-KdXVGetPortAttribute(ClientPtr client,
-                     XvPortPtr pPort, Atom attribute, INT32 *p_value)
+KdXVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1341,8 +1335,7 @@ KdXVGetPortAttribute(ClientPtr client,
 }
 
 static int
-KdXVQueryBestSize(ClientPtr client,
-                  XvPortPtr pPort,
+KdXVQueryBestSize(XvPortPtr pPort,
                   CARD8 motion,
                   CARD16 vid_w, CARD16 vid_h,
                   CARD16 drw_w, CARD16 drw_h,
@@ -1359,8 +1352,7 @@ KdXVQueryBestSize(ClientPtr client,
 }
 
 static int
-KdXVPutImage(ClientPtr client,
-             DrawablePtr pDraw,
+KdXVPutImage(DrawablePtr pDraw,
              XvPortPtr pPort,
              GCPtr pGC,
              INT16 src_x, INT16 src_y,
@@ -1455,8 +1447,7 @@ KdXVPutImage(ClientPtr client,
 }
 
 static int
-KdXVQueryImageAttributes(ClientPtr client,
-                         XvPortPtr pPort,
+KdXVQueryImageAttributes(XvPortPtr pPort,
                          XvImagePtr format,
                          CARD16 *width,
                          CARD16 *height, int *pitches, int *offsets)
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 141a4ed..d342bde 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -56,29 +56,29 @@
 
 /* XvAdaptorRec fields */
 
-static int xf86XVPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int xf86XVPutVideo(DrawablePtr, XvPortPtr, GCPtr,
                           INT16, INT16, CARD16, CARD16,
                           INT16, INT16, CARD16, CARD16);
-static int xf86XVPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int xf86XVPutStill(DrawablePtr, XvPortPtr, GCPtr,
                           INT16, INT16, CARD16, CARD16,
                           INT16, INT16, CARD16, CARD16);
-static int xf86XVGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int xf86XVGetVideo(DrawablePtr, XvPortPtr, GCPtr,
                           INT16, INT16, CARD16, CARD16,
                           INT16, INT16, CARD16, CARD16);
-static int xf86XVGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int xf86XVGetStill(DrawablePtr, XvPortPtr, GCPtr,
                           INT16, INT16, CARD16, CARD16,
                           INT16, INT16, CARD16, CARD16);
-static int xf86XVStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
-static int xf86XVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
-static int xf86XVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *);
-static int xf86XVQueryBestSize(ClientPtr, XvPortPtr, CARD8,
+static int xf86XVStopVideo(XvPortPtr, DrawablePtr);
+static int xf86XVSetPortAttribute(XvPortPtr, Atom, INT32);
+static int xf86XVGetPortAttribute(XvPortPtr, Atom, INT32 *);
+static int xf86XVQueryBestSize(XvPortPtr, CARD8,
                                CARD16, CARD16, CARD16, CARD16,
                                unsigned int *, unsigned int *);
-static int xf86XVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+static int xf86XVPutImage(DrawablePtr, XvPortPtr, GCPtr,
                           INT16, INT16, CARD16, CARD16,
                           INT16, INT16, CARD16, CARD16,
                           XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
-static int xf86XVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr,
+static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr,
                                       CARD16 *, CARD16 *, int *, int *);
 
 /* ScreenRec fields */
@@ -1271,8 +1271,7 @@ xf86XVModeSet(ScrnInfoPtr pScrn)
 /**** XvAdaptorRec fields ****/
 
 static int
-xf86XVPutVideo(ClientPtr client,
-               DrawablePtr pDraw,
+xf86XVPutVideo(DrawablePtr pDraw,
                XvPortPtr pPort,
                GCPtr pGC,
                INT16 vid_x, INT16 vid_y,
@@ -1322,8 +1321,7 @@ xf86XVPutVideo(ClientPtr client,
 }
 
 static int
-xf86XVPutStill(ClientPtr client,
-               DrawablePtr pDraw,
+xf86XVPutStill(DrawablePtr pDraw,
                XvPortPtr pPort,
                GCPtr pGC,
                INT16 vid_x, INT16 vid_y,
@@ -1420,8 +1418,7 @@ xf86XVPutStill(ClientPtr client,
 }
 
 static int
-xf86XVGetVideo(ClientPtr client,
-               DrawablePtr pDraw,
+xf86XVGetVideo(DrawablePtr pDraw,
                XvPortPtr pPort,
                GCPtr pGC,
                INT16 vid_x, INT16 vid_y,
@@ -1471,8 +1468,7 @@ xf86XVGetVideo(ClientPtr client,
 }
 
 static int
-xf86XVGetStill(ClientPtr client,
-               DrawablePtr pDraw,
+xf86XVGetStill(DrawablePtr pDraw,
                XvPortPtr pPort,
                GCPtr pGC,
                INT16 vid_x, INT16 vid_y,
@@ -1531,7 +1527,7 @@ xf86XVGetStill(ClientPtr client,
 }
 
 static int
-xf86XVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw)
+xf86XVStopVideo(XvPortPtr pPort, DrawablePtr pDraw)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1555,8 +1551,7 @@ xf86XVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw)
 }
 
 static int
-xf86XVSetPortAttribute(ClientPtr client,
-                       XvPortPtr pPort, Atom attribute, INT32 value)
+xf86XVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1566,8 +1561,7 @@ xf86XVSetPortAttribute(ClientPtr client,
 }
 
 static int
-xf86XVGetPortAttribute(ClientPtr client,
-                       XvPortPtr pPort, Atom attribute, INT32 *p_value)
+xf86XVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value)
 {
     XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr);
 
@@ -1577,8 +1571,7 @@ xf86XVGetPortAttribute(ClientPtr client,
 }
 
 static int
-xf86XVQueryBestSize(ClientPtr client,
-                    XvPortPtr pPort,
+xf86XVQueryBestSize(XvPortPtr pPort,
                     CARD8 motion,
                     CARD16 vid_w, CARD16 vid_h,
                     CARD16 drw_w, CARD16 drw_h,
@@ -1595,8 +1588,7 @@ xf86XVQueryBestSize(ClientPtr client,
 }
 
 static int
-xf86XVPutImage(ClientPtr client,
-               DrawablePtr pDraw,
+xf86XVPutImage(DrawablePtr pDraw,
                XvPortPtr pPort,
                GCPtr pGC,
                INT16 src_x, INT16 src_y,
@@ -1701,8 +1693,7 @@ xf86XVPutImage(ClientPtr client,
 }
 
 static int
-xf86XVQueryImageAttributes(ClientPtr client,
-                           XvPortPtr pPort,
+xf86XVQueryImageAttributes(XvPortPtr pPort,
                            XvImagePtr format,
                            CARD16 *width,
                            CARD16 *height, int *pitches, int *offsets)
-- 
2.0.1



More information about the xorg-devel mailing list