struct xlib_sw_winsys
{
struct sw_winsys base;
-
-
-
Display *display;
};
}
-static char *alloc_shm(struct xm_displaytarget *buf, unsigned size)
+static char *
+alloc_shm(struct xm_displaytarget *buf, unsigned size)
{
XShmSegmentInfo *const shminfo = & buf->shminfo;
return xm_dt->mapped;
}
+
static void
xm_displaytarget_unmap(struct sw_winsys *ws,
struct sw_displaytarget *dt)
xm_dt->mapped = NULL;
}
+
static void
xm_displaytarget_destroy(struct sw_winsys *ws,
struct sw_displaytarget *dt)
XSetFunction( display, xm_dt->gc, GXcopy );
}
- if (xm_dt->shm)
- {
+ if (xm_dt->shm) {
ximage = xm_dt->tempImage;
ximage->data = xm_dt->data;
XFlush(xm_dt->display);
}
+
/**
* Display/copy the image in the surface into the X window specified
* by the XMesaBuffer.
unsigned nblocksy, size;
xm_dt = CALLOC_STRUCT(xm_displaytarget);
- if(!xm_dt)
+ if (!xm_dt)
goto no_xm_dt;
xm_dt->display = ((struct xlib_sw_winsys *)winsys)->display;
}
}
- if(!xm_dt->data) {
+ if (!xm_dt->data) {
xm_dt->data = align_malloc(size, alignment);
- if(!xm_dt->data)
+ if (!xm_dt->data)
goto no_data;
}
return &ws->base;
}
-