Mesa (master): st/glx: remove the duplicated Drawable member.

Stephane Marchesin marcheu at kemper.freedesktop.org
Thu Oct 6 00:40:51 UTC 2011


Module: Mesa
Branch: master
Commit: c3ef232315a4e9c18b3d812dbb28ffac6830d6f8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3ef232315a4e9c18b3d812dbb28ffac6830d6f8

Author: Stéphane Marchesin <marcheu at chromium.org>
Date:   Wed Oct  5 17:36:32 2011 -0700

st/glx: remove the duplicated Drawable member.

If you want to access it, you should use the Drawable in xlib_drawable instead.

---

 src/gallium/state_trackers/glx/xlib/glx_api.c |   10 +++++-----
 src/gallium/state_trackers/glx/xlib/xm_api.c  |    2 +-
 src/gallium/state_trackers/glx/xlib/xm_api.h  |    1 -
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index a7aafd8..824fdab 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -1259,7 +1259,7 @@ glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap )
    if (!b) {
       return 0;
    }
-   return b->drawable;
+   return b->ws.drawable;
 }
 
 
@@ -1285,7 +1285,7 @@ glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visinfo,
    if (!b) {
       return 0;
    }
-   return b->drawable;
+   return b->ws.drawable;
 }
 
 
@@ -2036,7 +2036,7 @@ glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList)
    if (xmbuf) {
       xmbuf->largestPbuffer = useLargest;
       xmbuf->preservedContents = preserveContents;
-      return (GLXPbuffer) xmbuf->drawable;
+      return (GLXPbuffer) xmbuf->ws.drawable;
    }
    else {
       return 0;
@@ -2310,7 +2310,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config,
 {
    XMesaVisual xmvis = (XMesaVisual) config;
    XMesaBuffer xmbuf = XMesaCreatePixmapBuffer(xmvis, pixmap, 0);
-   return xmbuf->drawable; /* need to return an X ID */
+   return xmbuf->ws.drawable; /* need to return an X ID */
 }
 
 
@@ -2390,7 +2390,7 @@ glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config,
    /* A GLXPbuffer handle must be an X Drawable because that's what
     * glXMakeCurrent takes.
     */
-   return (GLXPbuffer) xmbuf->drawable;
+   return (GLXPbuffer) xmbuf->ws.drawable;
 }
 
 
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index faaa5a7..8f6406d 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -448,7 +448,7 @@ create_xmesa_buffer(Drawable d, BufferType type,
    if (!b)
       return NULL;
 
-   b->ws.drawable = b->drawable = d;
+   b->ws.drawable = d;
    b->ws.visual = vis->visinfo->visual;
    b->ws.depth = vis->visinfo->depth;
 
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.h b/src/gallium/state_trackers/glx/xlib/xm_api.h
index 57571fe..606bcf3 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.h
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.h
@@ -329,7 +329,6 @@ struct xmesa_buffer {
 
    GLboolean wasCurrent;	/* was ever the current buffer? */
    XMesaVisual xm_visual;	/* the X/Mesa visual */
-   Drawable drawable;	/* Usually the X window ID */
    Colormap cmap;		/* the X colormap */
    BufferType type;             /* window, pixmap, pbuffer or glxwindow */
 




More information about the mesa-commit mailing list