glx: Drop broken drawable garbage collection
[mesa.git] / src / glx / glxclient.h
index 4f5c02fc34d43460b19eca4abe922004d0d090f2..b453e6dbd0404af4173fb0f1cb7df0df9a9e57a0 100644 (file)
@@ -88,7 +88,6 @@ extern void DRI_glXUseXFont(struct glx_context *ctx,
 typedef struct __GLXDRIdisplayRec __GLXDRIdisplay;
 typedef struct __GLXDRIscreenRec __GLXDRIscreen;
 typedef struct __GLXDRIdrawableRec __GLXDRIdrawable;
-typedef struct __GLXDRIcontextRec __GLXDRIcontext;
 
 #include "glxextensions.h"
 
@@ -131,13 +130,6 @@ struct __GLXDRIscreenRec {
    int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
 };
 
-struct __GLXDRIcontextRec
-{
-   Bool(*bindContext) (struct glx_context *context, __GLXDRIdrawable *pdraw,
-                      __GLXDRIdrawable *pread);
-   void (*unbindContext) (struct glx_context *context);
-};
-
 struct __GLXDRIdrawableRec
 {
    void (*destroyDrawable) (__GLXDRIdrawable * drawable);
@@ -221,6 +213,9 @@ typedef struct __GLXattributeMachineRec
 
 struct glx_context_vtable {
    void (*destroy)(struct glx_context *ctx);
+   int (*bind)(struct glx_context *context, struct glx_context *old,
+              GLXDrawable draw, GLXDrawable read);
+   void (*unbind)(struct glx_context *context, struct glx_context *new);
    void (*wait_gl)(struct glx_context *ctx);
    void (*wait_x)(struct glx_context *ctx);
    void (*use_x_font)(struct glx_context *ctx,
@@ -265,6 +260,8 @@ struct glx_context
    GLint bufSize;
    /*@} */
 
+   const struct glx_context_vtable *vtable;
+
     /**
      * The XID of this rendering context.  When the context is created a
      * new XID is allocated.  This is set to None when the context is
@@ -388,15 +385,6 @@ struct glx_context
      */
    struct glx_config *config;
 
-#ifdef GLX_DIRECT_RENDERING
-#ifdef GLX_USE_APPLEGL
-   void *driContext;
-   Bool do_destroy;
-#else
-   __GLXDRIcontext *driContext;
-#endif
-#endif
-
     /**
      * The current read-drawable for this context.  Will be None if this
      * context is not current to any drawable.
@@ -437,8 +425,6 @@ struct glx_context
    unsigned long thread_id;
 
    char gl_extension_bits[__GL_EXT_BYTES];
-
-   const struct glx_context_vtable *vtable;
 };
 
 extern Bool
@@ -508,13 +494,13 @@ struct glx_screen
 
    struct glx_display *display;
 
+   Display *dpy;
+   int scr;
+
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /**
      * Per screen direct rendering interface functions and data.
      */
-   Display *dpy;
-   int scr;
-
    __GLXDRIscreen *driScreen;
 #endif
 
@@ -788,7 +774,13 @@ GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable);
 
 #endif
 
+extern struct glx_context dummyContext;
+
 extern struct glx_screen *
 indirect_create_screen(int screen, struct glx_display * priv);
+extern struct glx_context *
+indirect_create_context(struct glx_screen *psc,
+                       struct glx_config *mode,
+                       struct glx_context *shareList, int renderType);
 
 #endif /* !__GLX_client_h__ */