-/*
- * Return the size (width, height) of the X window for the given GLframebuffer.
- * Output: width - width of buffer in pixels.
- * height - height of buffer in pixels.
- */
-static void
-get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
-{
- /* We can do this cast because the first field in the XMesaBuffer
- * struct is a GLframebuffer struct. If this weren't true, we'd
- * need a pointer from the GLframebuffer to the XMesaBuffer.
- */
- const XMesaBuffer xmBuffer = (XMesaBuffer) buffer;
- unsigned int winwidth, winheight;
-#ifdef XFree86Server
- /* XFree86 GLX renderer */
- winwidth = MIN2(xmBuffer->frontxrb->pixmap->width, MAX_WIDTH);
- winheight = MIN2(xmBuffer->frontxrb->pixmap->height, MAX_HEIGHT);
-#else
- Window root;
- int winx, winy;
- unsigned int bw, d;
-
- _glthread_LOCK_MUTEX(_xmesa_lock);
- XSync(xmBuffer->xm_visual->display, 0); /* added for Chromium */
- XGetGeometry( xmBuffer->xm_visual->display, xmBuffer->frontxrb->pixmap,
- &root, &winx, &winy, &winwidth, &winheight, &bw, &d );
- _glthread_UNLOCK_MUTEX(_xmesa_lock);
-#endif
-
- *width = winwidth;
- *height = winheight;
-}
-
-