From: RALOVICH, Kristóf Date: Tue, 4 Nov 2008 16:30:21 +0000 (+0100) Subject: glx: xcbified glXSwapBuffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff3fa92eaa67579b3bd3480bc685cfc55ae1eff2;p=mesa.git glx: xcbified glXSwapBuffers --- diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 93fc40c2848..ec5ec4c3f07 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -865,7 +865,6 @@ PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap) PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) { - xGLXSwapBuffersReq *req; GLXContext gc; GLXContextTag tag; CARD8 opcode; @@ -896,6 +895,13 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) tag = 0; } +#ifdef USE_XCB + xcb_connection_t* c = XGetXCBConnection(dpy); + xcb_glx_swap_buffers(c, tag, drawable); + xcb_flush(c); +#else + xGLXSwapBuffersReq *req; + /* Send the glXSwapBuffers request */ LockDisplay(dpy); GetReq(GLXSwapBuffers,req); @@ -906,6 +912,7 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable) UnlockDisplay(dpy); SyncHandle(); XFlush(dpy); +#endif /* USE_XCB */ }