[PATCH 1/2] dix: Remove the memory of the multibuffer extension

Adam Jackson ajax at redhat.com
Mon Oct 11 07:49:56 PDT 2010


Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that
used them and it was killed in 0ba82562.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/dispatch.c      |   13 ++-----------
 hw/xwin/winfillsp.c |    5 -----
 hw/xwin/wingetsp.c  |    4 ----
 hw/xwin/winsetsp.c  |    4 ----
 include/pixmap.h    |    6 ++----
 5 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 17f308c..35e7ddd 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -916,23 +916,14 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep)
     rep->width = pDraw->width;
     rep->height = pDraw->height;
 
-    /* XXX - Because the pixmap-implementation of the multibuffer extension 
-     *       may have the buffer-id's drawable resource value be a pointer
-     *       to the buffer's window instead of the buffer itself
-     *       (this happens if the buffer is the displayed buffer),
-     *       we also have to check that the id matches before we can
-     *       truly say that it is a DRAWABLE_WINDOW.
-     */
-
-    if ((pDraw->type == UNDRAWABLE_WINDOW) ||
-        ((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id)))
+    if (WindowDrawable(pDraw))
     {
         WindowPtr pWin = (WindowPtr)pDraw;
 	rep->x = pWin->origin.x - wBorderWidth (pWin);
 	rep->y = pWin->origin.y - wBorderWidth (pWin);
 	rep->borderWidth = pWin->borderWidth;
     }
-    else /* DRAWABLE_PIXMAP or DRAWABLE_BUFFER */
+    else /* DRAWABLE_PIXMAP */
     {
 	rep->x = rep->y = rep->borderWidth = 0;
     }
diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c
index 1e8e3e6..00fd77a 100644
--- a/hw/xwin/winfillsp.c
+++ b/hw/xwin/winfillsp.c
@@ -854,11 +854,6 @@ winFillSpansNativeGDI (DrawablePtr	pDrawable,
 	}
       break;
 
-    case DRAWABLE_BUFFER:
-      /* DRAWABLE_BUFFER seems to be undocumented. */
-      ErrorF ("winFillSpans - DRAWABLE_BUFFER - Unimplemented\n");
-      break;
-
     default:
       ErrorF ("winFillSpans - Unknown drawable type\n");
       break;
diff --git a/hw/xwin/wingetsp.c b/hw/xwin/wingetsp.c
index 03f7f10..db914c9 100644
--- a/hw/xwin/wingetsp.c
+++ b/hw/xwin/wingetsp.c
@@ -181,10 +181,6 @@ winGetSpansNativeGDI (DrawablePtr	pDrawable,
       FatalError ("winGetSpans - UNDRAWABLE_WINDOW\n");
       break;
 
-    case DRAWABLE_BUFFER:
-      FatalError ("winGetSpans - DRAWABLE_BUFFER\n");
-      break;
-      
     default:
       FatalError ("winGetSpans - Unknown drawable type\n");
       break;
diff --git a/hw/xwin/winsetsp.c b/hw/xwin/winsetsp.c
index d1bf90b..6a90781 100644
--- a/hw/xwin/winsetsp.c
+++ b/hw/xwin/winsetsp.c
@@ -175,10 +175,6 @@ winSetSpansNativeGDI (DrawablePtr	pDrawable,
       FatalError ("\nwinSetSpansNativeGDI - UNDRAWABLE_WINDOW\n\n");
       break;
 
-    case DRAWABLE_BUFFER:
-      FatalError ("\nwinSetSpansNativeGDI - DRAWABLE_BUFFER\n\n");
-      break;
-      
     default:
       FatalError ("\nwinSetSpansNativeGDI - Unknown drawable type\n\n");
       break;
diff --git a/include/pixmap.h b/include/pixmap.h
index 5cf42d1..014a111 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -55,16 +55,14 @@ SOFTWARE.
 #define DRAWABLE_WINDOW 0
 #define DRAWABLE_PIXMAP 1
 #define UNDRAWABLE_WINDOW 2
-#define DRAWABLE_BUFFER 3
 
 /* corresponding type masks for dixLookupDrawable() */
 #define M_DRAWABLE_WINDOW	(1<<0)
 #define M_DRAWABLE_PIXMAP	(1<<1)
 #define M_UNDRAWABLE_WINDOW	(1<<2)
-#define M_DRAWABLE_BUFFER	(1<<3)
 #define M_ANY			(-1)
 #define M_WINDOW	(M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
-#define M_DRAWABLE	(M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
+#define M_DRAWABLE	(M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP)
 #define M_UNDRAWABLE	(M_UNDRAWABLE_WINDOW)
 
 /* flags to PaintWindow() */
@@ -88,7 +86,7 @@ typedef union _PixUnion {
     ((as) == (bs) && (SamePixUnion (a, b, as)))
 
 #define OnScreenDrawable(type) \
-	((type == DRAWABLE_WINDOW) || (type == DRAWABLE_BUFFER))
+	(type == DRAWABLE_WINDOW)
 
 #define WindowDrawable(type) \
 	((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
-- 
1.7.2.3



More information about the xorg-devel mailing list