Home | History | Annotate | Download | only in x11

Lines Matching defs:ximage

60  * Allocate a shared memory XImage back buffer for the given XMesaBuffer.
80 b->backxrb->ximage = XShmCreateImage(b->xm_visual->display,
85 if (b->backxrb->ximage == NULL) {
91 b->shminfo.shmid = shmget(IPC_PRIVATE, b->backxrb->ximage->bytes_per_line
92 * b->backxrb->ximage->height, IPC_CREAT|0777);
95 XDestroyImage(b->backxrb->ximage);
96 b->backxrb->ximage = NULL;
102 b->shminfo.shmaddr = b->backxrb->ximage->data
106 XDestroyImage(b->backxrb->ximage);
108 b->backxrb->ximage = NULL;
125 XDestroyImage(b->backxrb->ximage);
128 b->backxrb->ximage = NULL;
139 b->backxrb->ximage, 0, 0, 0, 0, 1, 1 /*one pixel*/, False);
146 XDestroyImage(b->backxrb->ximage);
149 b->backxrb->ximage = NULL;
168 * Setup an off-screen pixmap or Ximage to use as the back buffer.
175 /* Deallocate the old backxrb->ximage, if any */
176 if (b->backxrb->ximage) {
180 XDestroyImage(b->backxrb->ximage);
185 XMesaDestroyImage(b->backxrb->ximage);
186 b->backxrb->ximage = NULL;
194 /* Allocate a regular XImage for the back buffer. */
195 b->backxrb->ximage = XCreateImage(b->xm_visual->display,
202 if (!b->backxrb->ximage) {
206 b->backxrb->ximage->data = (char *) MALLOC(b->backxrb->ximage->height
207 * b->backxrb->ximage->bytes_per_line);
208 if (!b->backxrb->ximage->data) {
210 XMesaDestroyImage(b->backxrb->ximage);
211 b->backxrb->ximage = NULL;
231 b->backxrb->ximage = NULL;
240 /* XXX Note: the ximage or Pixmap attached to this renderbuffer
284 /* reallocate the back buffer XImage or Pixmap */
293 if (xrb->ximage) {
295 xrb->width2 = xrb->ximage->bytes_per_line / 2;
296 xrb->origin2 = (GLushort *) xrb->ximage->data + xrb->width2 * (height - 1);
299 xrb->width3 = xrb->ximage->bytes_per_line;
300 xrb->origin3 = (GLubyte *) xrb->ximage->data + xrb->width3 * (height - 1);
303 xrb->width4 = xrb->ximage->width;
304 xrb->origin4 = (GLuint *) xrb->ximage->data + xrb->width4 * (height - 1);
344 * pixmap via a temporary XImage which will be 32bpp.
394 /* free back ximage/pixmap/shmregion */
395 if (b->backxrb->ximage) {
399 XDestroyImage( b->backxrb->ximage );
404 XMesaDestroyImage( b->backxrb->ximage );
405 b->backxrb->ximage = NULL;
430 XImage *ximage = xrb->ximage;
440 if (ximage) {
443 *mapOut = (GLubyte *) ximage->data
444 + y2 * ximage->bytes_per_line
445 + x * ximage->bits_per_pixel / 8;
455 * isn't mapped. If we fail we'll create a temporary XImage.
460 /* read pixel data out of the pixmap/window into an XImage */
461 ximage = XGetImage(xrb->Parent->display,
468 /* create new, temporary XImage */
474 ximage = XCreateImage(xrb->Parent->display,
486 if (!ximage) {
492 xrb->map_ximage = ximage;
494 /* the first row of the OpenGL image is last row of the XImage */
495 *mapOut = (GLubyte *) ximage->data
496 + (h - 1) * ximage->bytes_per_line;
499 /* We return a negative stride here since XImage data is upside down
502 *rowStrideOut = -ximage->bytes_per_line;
521 XImage *ximage = xrb->ximage;
523 if (!ximage) {
529 /* put modified ximage data back into the pixmap/window */