[PATCH 21/22] xquartz: Remove unused DRI{,Post}ValidateTree

Adam Jackson ajax at redhat.com
Tue Jul 22 08:46:41 PDT 2014


Cargo-culted from DRI1, not actually used for anything.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xquartz/xpr/dri.c      | 51 -----------------------------------------------
 hw/xquartz/xpr/dri.h      |  8 --------
 pseudoramiX/pseudoramiX.c | 19 ------------------
 3 files changed, 78 deletions(-)

diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 014709b..0f19047 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -138,12 +138,6 @@ DRIFinishScreenInit(ScreenPtr pScreen)
     DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
 
     /* Wrap DRI support */
-    pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree;
-    pScreen->ValidateTree = DRIValidateTree;
-
-    pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree;
-    pScreen->PostValidateTree = DRIPostValidateTree;
-
     pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures;
     pScreen->WindowExposures = DRIWindowExposures;
 
@@ -624,51 +618,6 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
     pScreen->CopyWindow = DRICopyWindow;
 }
 
-int
-DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
-{
-    ScreenPtr pScreen = pParent->drawable.pScreen;
-    DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
-    int returnValue;
-
-    /* unwrap */
-    pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree;
-
-    /* call lower layers */
-    returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind);
-
-    /* rewrap */
-    pScreen->ValidateTree = DRIValidateTree;
-
-    return returnValue;
-}
-
-void
-DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
-{
-    ScreenPtr pScreen;
-    DRIScreenPrivPtr pDRIPriv;
-
-    if (pParent) {
-        pScreen = pParent->drawable.pScreen;
-    }
-    else {
-        pScreen = pChild->drawable.pScreen;
-    }
-    pDRIPriv = DRI_SCREEN_PRIV(pScreen);
-
-    if (pDRIPriv->wrap.PostValidateTree) {
-        /* unwrap */
-        pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree;
-
-        /* call lower layers */
-        (*pScreen->PostValidateTree)(pParent, pChild, kind);
-
-        /* rewrap */
-        pScreen->PostValidateTree = DRIPostValidateTree;
-    }
-}
-
 void
 DRIClipNotify(WindowPtr pWin, int dx, int dy)
 {
diff --git a/hw/xquartz/xpr/dri.h b/hw/xquartz/xpr/dri.h
index 70cb8b6..4476b06 100644
--- a/hw/xquartz/xpr/dri.h
+++ b/hw/xquartz/xpr/dri.h
@@ -53,8 +53,6 @@ typedef void (*ClipNotifyPtr)(WindowPtr, int, int);
 typedef struct {
     WindowExposuresProcPtr WindowExposures;
     CopyWindowProcPtr CopyWindow;
-    ValidateTreeProcPtr ValidateTree;
-    PostValidateTreeProcPtr PostValidateTree;
     ClipNotifyProcPtr ClipNotify;
 } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
 
@@ -107,12 +105,6 @@ DRIGetWrappedFuncs(ScreenPtr pScreen);
 extern void
 DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
 
-extern int
-DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind);
-
-extern void
-DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind);
-
 extern void
 DRIClipNotify(WindowPtr pWin, int dx, int dy);
 
diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c
index f47c783..d304da4 100644
--- a/pseudoramiX/pseudoramiX.c
+++ b/pseudoramiX/pseudoramiX.c
@@ -153,8 +153,6 @@ PseudoramiXAddScreen(int x, int y, int w, int h)
     s->h = h;
 }
 
-// Initialize PseudoramiX.
-// Copied from PanoramiXExtensionInit
 void
 PseudoramiXExtensionInit(void)
 {
@@ -165,16 +163,6 @@ PseudoramiXExtensionInit(void)
 
     TRACE;
 
-    /* Even with only one screen we need to enable PseudoramiX to allow
-       dynamic screen configuration changes. */
-#if 0
-    if (pseudoramiXNumScreens == 1) {
-        // Only one screen - disable Xinerama extension.
-        noPseudoramiXExtension = TRUE;
-        return;
-    }
-#endif
-
     if (pseudoramiXGeneration != serverGeneration) {
         extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
                                 ProcPseudoramiXDispatch,
@@ -213,7 +201,6 @@ PseudoramiXResetProc(ExtensionEntry *extEntry)
     PseudoramiXResetScreens();
 }
 
-// was PanoramiX
 static int
 ProcPseudoramiXQueryVersion(ClientPtr client)
 {
@@ -222,7 +209,6 @@ ProcPseudoramiXQueryVersion(ClientPtr client)
     return ProcPanoramiXQueryVersion(client);
 }
 
-// was PanoramiX
 static int
 ProcPseudoramiXGetState(ClientPtr client)
 {
@@ -252,7 +238,6 @@ ProcPseudoramiXGetState(ClientPtr client)
     return Success;
 }
 
-// was PanoramiX
 static int
 ProcPseudoramiXGetScreenCount(ClientPtr client)
 {
@@ -282,7 +267,6 @@ ProcPseudoramiXGetScreenCount(ClientPtr client)
     return Success;
 }
 
-// was PanoramiX
 static int
 ProcPseudoramiXGetScreenSize(ClientPtr client)
 {
@@ -323,7 +307,6 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
     return Success;
 }
 
-// was Xinerama
 static int
 ProcPseudoramiXIsActive(ClientPtr client)
 {
@@ -347,7 +330,6 @@ ProcPseudoramiXIsActive(ClientPtr client)
     return Success;
 }
 
-// was Xinerama
 static int
 ProcPseudoramiXQueryScreens(ClientPtr client)
 {
@@ -394,7 +376,6 @@ ProcPseudoramiXQueryScreens(ClientPtr client)
     return Success;
 }
 
-// was PanoramiX
 static int
 ProcPseudoramiXDispatch(ClientPtr client)
 {
-- 
1.9.3



More information about the xorg-devel mailing list