drivers/x11: unifdef XFree86Server
This code was for the old GLcore build of the software rasteriser. The X server switched to a DRI driver for software indirect GLX long ago. Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
#include "main/renderbuffer.h"
|
||||
|
||||
|
||||
#if defined(USE_XSHM) && !defined(XFree86Server)
|
||||
#if defined(USE_XSHM)
|
||||
static volatile int mesaXErrorFlag = 0;
|
||||
|
||||
/**
|
||||
@@ -170,7 +170,7 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height)
|
||||
if (b->db_mode == BACK_XIMAGE) {
|
||||
/* Deallocate the old backxrb->ximage, if any */
|
||||
if (b->backxrb->ximage) {
|
||||
#if defined(USE_XSHM) && !defined(XFree86Server)
|
||||
#if defined(USE_XSHM)
|
||||
if (b->shm) {
|
||||
XShmDetach(b->xm_visual->display, &b->shminfo);
|
||||
XDestroyImage(b->backxrb->ximage);
|
||||
@@ -188,10 +188,6 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height)
|
||||
/* Allocate new back buffer */
|
||||
if (b->shm == 0 || !alloc_back_shm_ximage(b, width, height)) {
|
||||
/* Allocate a regular XImage for the back buffer. */
|
||||
#ifdef XFree86Server
|
||||
b->backxrb->ximage = XMesaCreateImage(b->xm_visual->BitsPerPixel,
|
||||
width, height, NULL);
|
||||
#else
|
||||
b->backxrb->ximage = XCreateImage(b->xm_visual->display,
|
||||
b->xm_visual->visinfo->visual,
|
||||
GET_VISUAL_DEPTH(b->xm_visual),
|
||||
@@ -199,7 +195,6 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height)
|
||||
NULL,
|
||||
width, height,
|
||||
8, 0); /* pad, bytes_per_line */
|
||||
#endif
|
||||
if (!b->backxrb->ximage) {
|
||||
_mesa_warning(NULL, "alloc_back_buffer: XCreateImage failed.\n");
|
||||
return;
|
||||
@@ -359,16 +354,8 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb)
|
||||
if (b->num_alloced > 0) {
|
||||
/* If no other buffer uses this X colormap then free the colors. */
|
||||
if (!xmesa_find_buffer(b->display, b->cmap, b)) {
|
||||
#ifdef XFree86Server
|
||||
int client = 0;
|
||||
if (b->frontxrb->drawable)
|
||||
client = CLIENT_ID(b->frontxrb->drawable->id);
|
||||
(void)FreeColors(b->cmap, client,
|
||||
b->num_alloced, b->alloced_colors, 0);
|
||||
#else
|
||||
XFreeColors(b->display, b->cmap,
|
||||
b->alloced_colors, b->num_alloced, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +369,7 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb)
|
||||
if (fb->Visual.doubleBufferMode) {
|
||||
/* free back ximage/pixmap/shmregion */
|
||||
if (b->backxrb->ximage) {
|
||||
#if defined(USE_XSHM) && !defined(XFree86Server)
|
||||
#if defined(USE_XSHM)
|
||||
if (b->shm) {
|
||||
XShmDetach( b->display, &b->shminfo );
|
||||
XDestroyImage( b->backxrb->ximage );
|
||||
|
Reference in New Issue
Block a user