#include "main/teximage.h"
#include "main/version.h"
#include "main/vtxfmt.h"
-#include "glapi/glthread.h"
#include "swrast/swrast.h"
#include "swrast/s_renderbuffer.h"
#include "swrast_setup/swrast_setup.h"
/**
* Global X driver lock
*/
-_glthread_Mutex _xmesa_lock;
+mtx_t _xmesa_lock;
{
Status stat;
- _glthread_LOCK_MUTEX(_xmesa_lock);
+ mtx_lock(&_xmesa_lock);
XSync(b->xm_visual->display, 0); /* added for Chromium */
stat = get_drawable_size(dpy, b->frontxrb->pixmap, width, height);
- _glthread_UNLOCK_MUTEX(_xmesa_lock);
+ mtx_unlock(&_xmesa_lock);
if (!stat) {
/* probably querying a window that's recently been destroyed */
TNLcontext *tnl;
if (firstTime) {
- _glthread_INIT_MUTEX(_xmesa_lock);
+ mtx_init(&_xmesa_lock, mtx_plain);
firstTime = GL_FALSE;
}
/* Copy Ximage (back buf) from client memory to server window */
#if defined(USE_XSHM)
if (b->shm) {
- /*_glthread_LOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_lock(&_xmesa_lock);*/
XShmPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, 0, 0,
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height,
False );
- /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_unlock(&_xmesa_lock);*/
}
else
#endif
{
- /*_glthread_LOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_lock(&_xmesa_lock);*/
XMesaPutImage( b->xm_visual->display, b->frontxrb->drawable,
b->swapgc,
b->backxrb->ximage, 0, 0,
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height );
- /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_unlock(&_xmesa_lock);*/
}
}
else if (b->backxrb->pixmap) {
/* Copy pixmap (back buf) to window (front buf) on server */
- /*_glthread_LOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_lock(&_xmesa_lock);*/
XMesaCopyArea( b->xm_visual->display,
b->backxrb->pixmap, /* source drawable */
b->frontxrb->drawable, /* dest. drawable */
0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height,
0, 0 /* dest region */
);
- /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/
+ /*mtx_unlock(&_xmesa_lock);*/
}
}
XSync( b->xm_visual->display, False );