X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fglx_pbuffer.c;h=fd3327f12099b78eb4827bb6c69c94cbe6331647;hb=52426ce4a929f7e1389baf490967fc02357b3f5e;hp=231ab206045e28168a4c2a27d7af768c613e6101;hpb=2670d0f91d631c72d83e97d1ecc512a4a624f669;p=mesa.git diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 231ab206045..fd3327f1209 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -272,9 +272,9 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) * 10. Given that, this routine should try to use an array on the stack to * capture the reply rather than always calling Xmalloc. */ -static int -GetDrawableAttribute(Display * dpy, GLXDrawable drawable, - int attribute, unsigned int *value) +int +__glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable, + int attribute, unsigned int *value) { struct glx_display *priv; xGLXGetDrawableAttributesReply reply; @@ -328,7 +328,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable, * the calling thread's current context a GLXBadDrawable error is * generated." */ - if (pdraw == NULL || gc == NULL || gc->currentDpy != dpy || + if (pdraw == NULL || gc == &dummyContext || gc->currentDpy != dpy || (gc->currentDrawable != drawable && gc->currentReadable != drawable)) { __glXSendError(dpy, GLXBadDrawable, drawable, @@ -679,7 +679,7 @@ DestroyPbuffer(Display * dpy, GLXDrawable drawable) /** * Create a new pbuffer. */ -_X_EXPORT GLXPbufferSGIX +_GLX_PUBLIC GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list) @@ -694,7 +694,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config, /** * Create a new pbuffer. */ -_X_EXPORT GLXPbuffer +_GLX_PUBLIC GLXPbuffer glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) { int i, width, height; @@ -769,7 +769,7 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) /** * Destroy an existing pbuffer. */ -_X_EXPORT void +_GLX_PUBLIC void glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf) { #ifdef GLX_USE_APPLEGL @@ -785,7 +785,7 @@ glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf) /** * Query an attribute of a drawable. */ -_X_EXPORT void +_GLX_PUBLIC void glXQueryDrawable(Display * dpy, GLXDrawable drawable, int attribute, unsigned int *value) { @@ -825,7 +825,7 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable, } } #else - GetDrawableAttribute(dpy, drawable, attribute, value); + __glXGetDrawableAttribute(dpy, drawable, attribute, value); #endif } @@ -834,18 +834,18 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable, /** * Query an attribute of a pbuffer. */ -_X_EXPORT int +_GLX_PUBLIC int glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable, int attribute, unsigned int *value) { - return GetDrawableAttribute(dpy, drawable, attribute, value); + return __glXGetDrawableAttribute(dpy, drawable, attribute, value); } #endif /** * Select the event mask for a drawable. */ -_X_EXPORT void +_GLX_PUBLIC void glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask) { #ifdef GLX_USE_APPLEGL @@ -878,7 +878,7 @@ glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask) /** * Get the selected event mask for a drawable. */ -_X_EXPORT void +_GLX_PUBLIC void glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) { #ifdef GLX_USE_APPLEGL @@ -901,7 +901,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) __glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes, true); #else - unsigned int value; + unsigned int value = 0; /* The non-sense with value is required because on LP64 platforms @@ -909,13 +909,13 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) * we could just type-cast the pointer, but why? */ - GetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value); + __glXGetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value); *mask = value; #endif } -_X_EXPORT GLXPixmap +_GLX_PUBLIC GLXPixmap glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list) { @@ -935,7 +935,7 @@ glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, } -_X_EXPORT GLXWindow +_GLX_PUBLIC GLXWindow glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, const int *attrib_list) { @@ -970,7 +970,7 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, } -_X_EXPORT void +_GLX_PUBLIC void glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) { WARN_ONCE_GLX_1_3(dpy, __func__); @@ -983,7 +983,7 @@ glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) } -_X_EXPORT void +_GLX_PUBLIC void glXDestroyWindow(Display * dpy, GLXWindow win) { WARN_ONCE_GLX_1_3(dpy, __func__); @@ -992,20 +992,18 @@ glXDestroyWindow(Display * dpy, GLXWindow win) #endif } -#ifndef GLX_USE_APPLEGL -_X_EXPORT +_GLX_PUBLIC GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX, (Display * dpy, GLXPbufferSGIX pbuf), (dpy, pbuf), glXDestroyPbuffer) -_X_EXPORT +_GLX_PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX, (Display * dpy, GLXDrawable drawable, unsigned long mask), (dpy, drawable, mask), glXSelectEvent) -_X_EXPORT +_GLX_PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX, (Display * dpy, GLXDrawable drawable, unsigned long *mask), (dpy, drawable, mask), glXGetSelectedEvent) -#endif