Mesa (gallium-xlib-rework): xlib: don' t explicitly create the pipe_winsys struct

Keith Whitwell keithw at kemper.freedesktop.org
Sat Jan 17 17:15:23 UTC 2009


Module: Mesa
Branch: gallium-xlib-rework
Commit: 4f134f91a427b053d1bc069cb6cac48a0982abc3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f134f91a427b053d1bc069cb6cac48a0982abc3

Author: Keith Whitwell <keith at tungstengraphics.com>
Date:   Sat Jan 17 17:06:14 2009 +0000

xlib: don't explicitly create the pipe_winsys struct

---

 src/gallium/state_trackers/glx/xlib/xm_api.c    |   13 +------------
 src/gallium/state_trackers/glx/xlib/xm_winsys.h |    5 +----
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 4811641..e0b666f 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -65,7 +65,6 @@
 #include "state_tracker/st_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
-#include "pipe/p_winsys.h"
 #include "pipe/p_context.h"
 
 #include "xm_winsys.h"
@@ -743,7 +742,6 @@ PUBLIC
 XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
 {
    static GLboolean firstTime = GL_TRUE;
-   struct pipe_winsys *winsys;
    struct pipe_screen *screen;
    struct pipe_context *pipe;
    XMesaContext c;
@@ -768,13 +766,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
    
    /* XXX: create once per Xlib Display.
     */
-   winsys = driver.create_pipe_winsys();
-   if (winsys == NULL)
-      goto fail;
-
-   /* XXX: create once per Xlib Display.
-    */
-   screen = driver.create_pipe_screen( winsys );
+   screen = driver.create_pipe_screen();
    if (screen == NULL)
       goto fail;
 
@@ -811,9 +803,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
    if (screen)
       screen->destroy( screen );
 
-   if (winsys)
-      winsys->destroy( winsys );
-
    FREE(c);
    return NULL;
 }
diff --git a/src/gallium/state_trackers/glx/xlib/xm_winsys.h b/src/gallium/state_trackers/glx/xlib/xm_winsys.h
index 8b6d164..0e57605 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_winsys.h
+++ b/src/gallium/state_trackers/glx/xlib/xm_winsys.h
@@ -31,16 +31,13 @@
 
 struct pipe_context;
 struct pipe_screen;
-struct pipe_winsys;
 struct pipe_surface;
 struct xmesa_buffer;
 
 
 struct xm_driver {
 
-   struct pipe_winsys *(*create_pipe_winsys)( void );
-
-   struct pipe_screen *(*create_pipe_screen)( struct pipe_winsys * );
+   struct pipe_screen *(*create_pipe_screen)( void );
 
    /* The context_private argument needs to go away.  Is currently used
     * in a round-about way to associate a display-target surface with its




More information about the mesa-commit mailing list