diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2009-01-08 16:05:45 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2009-01-08 16:05:45 +0000 |
commit | ee2876316a541c7513cc902f106a00890c625f9f (patch) | |
tree | 6dcf713a87e507e90910c65a6bed2313f57269a4 /src/gallium | |
parent | 92e23ef81f4411f60baec107a45c92c51133134a (diff) |
xlib: strip out some unused XMesa api functions
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/xlib/fakeglx.c | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/xlib/xm_api.c | 85 | ||||
-rw-r--r-- | src/gallium/state_trackers/xlib/xm_api.h | 118 |
3 files changed, 4 insertions, 200 deletions
diff --git a/src/gallium/state_trackers/xlib/fakeglx.c b/src/gallium/state_trackers/xlib/fakeglx.c index 04ba112b24..e62ff239d0 100644 --- a/src/gallium/state_trackers/xlib/fakeglx.c +++ b/src/gallium/state_trackers/xlib/fakeglx.c @@ -50,7 +50,6 @@ #include "mtypes.h" #include "version.h" #include "fakeglx.h" -#include "xmesaP.h" #include "state_tracker/st_context.h" #include "state_tracker/st_public.h" diff --git a/src/gallium/state_trackers/xlib/xm_api.c b/src/gallium/state_trackers/xlib/xm_api.c index b3c38bb022..67a9a1ec8c 100644 --- a/src/gallium/state_trackers/xlib/xm_api.c +++ b/src/gallium/state_trackers/xlib/xm_api.c @@ -59,7 +59,6 @@ #include "glxheader.h" #include "xm_api.h" -#include "xmesaP.h" #include "main/context.h" #include "main/framebuffer.h" @@ -1015,8 +1014,7 @@ XMesaDestroyBuffer(XMesaBuffer b) * and all attached renderbuffers. * Called when: * 1. the first time a buffer is bound to a context. - * 2. from the XMesaResizeBuffers() API function. - * 3. SwapBuffers. XXX probabaly from xm_flush_frontbuffer() too... + * 2. SwapBuffers. XXX probabaly from xm_flush_frontbuffer() too... * Note: it's possible (and legal) for xmctx to be NULL. That can happen * when resizing a buffer when no rendering context is bound. */ @@ -1100,30 +1098,6 @@ XMesaContext XMesaGetCurrentContext( void ) } -XMesaBuffer XMesaGetCurrentBuffer( void ) -{ - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - XMesaBuffer xmbuf = xmesa_buffer(ctx->DrawBuffer); - return xmbuf; - } - else { - return 0; - } -} - - -/* New in Mesa 3.1 */ -XMesaBuffer XMesaGetCurrentReadBuffer( void ) -{ - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - return xmesa_buffer(ctx->ReadBuffer); - } - else { - return 0; - } -} @@ -1176,25 +1150,6 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) -/* - * Return the depth buffer associated with an XMesaBuffer. - * Input: b - the XMesa buffer handle - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ) -{ - *width = 0; - *height = 0; - *bytesPerValue = 0; - *buffer = 0; - return GL_FALSE; -} - - void XMesaFlush( XMesaContext c ) { if (c && c->xm_visual->display) { @@ -1205,20 +1160,6 @@ void XMesaFlush( XMesaContext c ) -const char *XMesaGetString( XMesaContext c, int name ) -{ - (void) c; - if (name==XMESA_VERSION) { - return "5.0"; - } - else if (name==XMESA_EXTENSIONS) { - return ""; - } - else { - return NULL; - } -} - XMesaBuffer XMesaFindBuffer( Display *dpy, Drawable d ) @@ -1271,30 +1212,6 @@ void XMesaGarbageCollect( void ) } -unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, - GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ) -{ - /* no longer supported */ - return 0; -} - - -/* - * This is typically called when the window size changes and we need - * to reallocate the buffer's back/depth/stencil/accum buffers. - */ -PUBLIC void -XMesaResizeBuffers( XMesaBuffer b ) -{ - GET_CURRENT_CONTEXT(ctx); - XMesaContext xmctx = xmesa_context(ctx); - if (!xmctx) - return; - xmesa_check_and_update_buffer_size(xmctx, b); -} - - PUBLIC void diff --git a/src/gallium/state_trackers/xlib/xm_api.h b/src/gallium/state_trackers/xlib/xm_api.h index d1f585e329..33d2f2c522 100644 --- a/src/gallium/state_trackers/xlib/xm_api.h +++ b/src/gallium/state_trackers/xlib/xm_api.h @@ -64,35 +64,6 @@ and create a window, you must do the following to use the X/Mesa interface: #ifndef XMESA_H #define XMESA_H -#ifdef __VMS -#include <GL/vms_x_fix.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include "GL/gl.h" - -#ifdef AMIWIN -#include <pragmas/xlib_pragmas.h> -extern struct Library *XLibBase; -#endif - - -#define XMESA_MAJOR_VERSION 6 -#define XMESA_MINOR_VERSION 3 - - - -/* - * Values passed to XMesaGetString: - */ -#define XMESA_VERSION 1 -#define XMESA_EXTENSIONS 2 - typedef struct xmesa_context *XMesaContext; @@ -101,6 +72,9 @@ typedef struct xmesa_visual *XMesaVisual; typedef struct xmesa_buffer *XMesaBuffer; +/* Every user of this file also includes xmesaP.h + */ +#include "xmesaP.h" /* @@ -222,19 +196,6 @@ extern XMesaContext XMesaGetCurrentContext( void ); /* - * Return handle to the current (draw) buffer. - */ -extern XMesaBuffer XMesaGetCurrentBuffer( void ); - - -/* - * Return handle to the current read buffer. - * New in Mesa 3.3 - */ -extern XMesaBuffer XMesaGetCurrentReadBuffer( void ); - - -/* * Swap the front and back buffers for the given buffer. No action is * taken if the buffer is not double buffered. */ @@ -253,37 +214,6 @@ extern void XMesaCopySubBuffer( XMesaBuffer b, int height ); -/* - * Return a pointer to the the Pixmap or XImage being used as the back - * color buffer of an XMesaBuffer. This function is a way to get "under - * the hood" of X/Mesa so one can manipulate the back buffer directly. - * Input: b - the XMesaBuffer - * Output: pixmap - pointer to back buffer's Pixmap, or 0 - * ximage - pointer to back buffer's XImage, or NULL - * Return: GL_TRUE = context is double buffered - * GL_FALSE = context is single buffered - */ -extern GLboolean XMesaGetBackBuffer( XMesaBuffer b, - Pixmap *pixmap, - XImage **ximage ); - - - -/* - * Return the depth buffer associated with an XMesaBuffer. - * Input: b - the XMesa buffer handle - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 2.4. - */ -extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b, - GLint *width, - GLint *height, - GLint *bytesPerValue, - void **buffer ); @@ -295,14 +225,6 @@ extern void XMesaFlush( XMesaContext c ); /* - * Get an X/Mesa-specific string. - * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS - */ -extern const char *XMesaGetString( XMesaContext c, int name ); - - - -/* * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free * any memory used by that buffer. * @@ -313,36 +235,6 @@ extern void XMesaGarbageCollect( void ); /* - * Return a dithered pixel value. - * Input: c - XMesaContext - * x, y - window coordinate - * red, green, blue, alpha - color components in [0,1] - * Return: pixel value - * - * New in Mesa 2.3. - */ -extern unsigned long XMesaDitherColor( XMesaContext xmesa, - GLint x, - GLint y, - GLfloat red, - GLfloat green, - GLfloat blue, - GLfloat alpha ); - - - - -/* - * Reallocate the back/depth/stencil/accum/etc/ buffers associated with - * buffer <b> if its size has changed. - * - * New in Mesa 4.0.2 - */ -extern void XMesaResizeBuffers( XMesaBuffer b ); - - - -/* * Create a pbuffer. * New in Mesa 4.1 */ @@ -370,9 +262,5 @@ XMesaCreatePixmapTextureBuffer(XMesaVisual v, Pixmap p, -#ifdef __cplusplus -} -#endif - #endif |