summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-31 15:59:24 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-31 15:59:24 -0600
commit869318db646e8a1e040cc56f271936f0c94762dc (patch)
treee00b1e1af689b328085d2ab7f7b5772e437c3482 /src/mesa/pipe
parent3023756684eb54642477802757eeb9fb5da433cc (diff)
move few remaining bits of xm_dd.c into xm_api.c
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/xlib/xm_api.c57
-rw-r--r--src/mesa/pipe/xlib/xm_dd.c55
-rw-r--r--src/mesa/pipe/xlib/xmesaP.h4
3 files changed, 57 insertions, 59 deletions
diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c
index 7d52010b2f..1693530fbf 100644
--- a/src/mesa/pipe/xlib/xm_api.c
+++ b/src/mesa/pipe/xlib/xm_api.c
@@ -1365,6 +1365,63 @@ void XMesaDestroyVisual( XMesaVisual v )
+static void
+finish_or_flush( GLcontext *ctx )
+{
+#ifdef XFree86Server
+ /* NOT_NEEDED */
+#else
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
+ if (xmesa) {
+ _glthread_LOCK_MUTEX(_xmesa_lock);
+ XSync( xmesa->display, False );
+ _glthread_UNLOCK_MUTEX(_xmesa_lock);
+ }
+#endif
+ abort();
+}
+
+
+/**
+ * Called by glViewport.
+ * This is a good time for us to poll the current X window size and adjust
+ * our renderbuffers to match the current window size.
+ * Remember, we have no opportunity to respond to conventional
+ * X Resize/StructureNotify events since the X driver has no event loop.
+ * Thus, we poll.
+ * Note that this trick isn't fool-proof. If the application never calls
+ * glViewport, our notion of the current window size may be incorrect.
+ * That problem led to the GLX_MESA_resize_buffers extension.
+ */
+static void
+xmesa_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ XMesaContext xmctx = XMESA_CONTEXT(ctx);
+ XMesaBuffer xmdrawbuf = XMESA_BUFFER(ctx->WinSysDrawBuffer);
+ XMesaBuffer xmreadbuf = XMESA_BUFFER(ctx->WinSysReadBuffer);
+ xmesa_check_and_update_buffer_size(xmctx, xmdrawbuf);
+ xmesa_check_and_update_buffer_size(xmctx, xmreadbuf);
+ (void) x;
+ (void) y;
+ (void) w;
+ (void) h;
+}
+
+
+/**
+ * Initialize the device driver function table with the functions
+ * we implement in this driver.
+ */
+static void
+xmesa_init_driver_functions( XMesaVisual xmvisual,
+ struct dd_function_table *driver )
+{
+ driver->Flush = finish_or_flush;
+ driver->Finish = finish_or_flush;
+ driver->Viewport = xmesa_viewport;
+}
+
+
/**
* Create a new XMesaContext.
* \param v the XMesaVisual
diff --git a/src/mesa/pipe/xlib/xm_dd.c b/src/mesa/pipe/xlib/xm_dd.c
index 56db798869..8a58c3598e 100644
--- a/src/mesa/pipe/xlib/xm_dd.c
+++ b/src/mesa/pipe/xlib/xm_dd.c
@@ -39,58 +39,3 @@
#include "state_tracker/st_draw.h"
-static void
-finish_or_flush( GLcontext *ctx )
-{
-#ifdef XFree86Server
- /* NOT_NEEDED */
-#else
- const XMesaContext xmesa = XMESA_CONTEXT(ctx);
- if (xmesa) {
- _glthread_LOCK_MUTEX(_xmesa_lock);
- XSync( xmesa->display, False );
- _glthread_UNLOCK_MUTEX(_xmesa_lock);
- }
-#endif
- abort();
-}
-
-
-/**
- * Called by glViewport.
- * This is a good time for us to poll the current X window size and adjust
- * our renderbuffers to match the current window size.
- * Remember, we have no opportunity to respond to conventional
- * X Resize/StructureNotify events since the X driver has no event loop.
- * Thus, we poll.
- * Note that this trick isn't fool-proof. If the application never calls
- * glViewport, our notion of the current window size may be incorrect.
- * That problem led to the GLX_MESA_resize_buffers extension.
- */
-static void
-xmesa_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
- XMesaContext xmctx = XMESA_CONTEXT(ctx);
- XMesaBuffer xmdrawbuf = XMESA_BUFFER(ctx->WinSysDrawBuffer);
- XMesaBuffer xmreadbuf = XMESA_BUFFER(ctx->WinSysReadBuffer);
- xmesa_check_and_update_buffer_size(xmctx, xmdrawbuf);
- xmesa_check_and_update_buffer_size(xmctx, xmreadbuf);
- (void) x;
- (void) y;
- (void) w;
- (void) h;
-}
-
-
-/**
- * Initialize the device driver function table with the functions
- * we implement in this driver.
- */
-void
-xmesa_init_driver_functions( XMesaVisual xmvisual,
- struct dd_function_table *driver )
-{
- driver->Flush = finish_or_flush;
- driver->Finish = finish_or_flush;
- driver->Viewport = xmesa_viewport;
-}
diff --git a/src/mesa/pipe/xlib/xmesaP.h b/src/mesa/pipe/xlib/xmesaP.h
index 3cfb2e958d..c4c78be864 100644
--- a/src/mesa/pipe/xlib/xmesaP.h
+++ b/src/mesa/pipe/xlib/xmesaP.h
@@ -484,10 +484,6 @@ extern void
xmesa_check_and_update_buffer_size(XMesaContext xmctx, XMesaBuffer drawBuffer);
extern void
-xmesa_init_driver_functions( XMesaVisual xmvisual,
- struct dd_function_table *driver );
-
-extern void
xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb,
enum pixel_format pixelformat, GLint depth);