Commit fe39d8a3 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXshm.c: slight simplification

parent b65dd4e3
...@@ -190,9 +190,6 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -190,9 +190,6 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
char *data; char *data;
{ {
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
int length;
char *newdata;
#ifdef TEST #ifdef TEST
fprintf(stderr, "fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].\n", fprintf(stderr, "fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].\n",
(void *) dst, (void *) pGC, (void *) data); (void *) dst, (void *) pGC, (void *) data);
...@@ -227,9 +224,9 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -227,9 +224,9 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
sx, sy, sw, sh, dx); sx, sy, sw, sh, dx);
#endif #endif
length = nxagentImageLength(sw, sh, format, 0, depth); char *newdata = calloc(1, nxagentImageLength(sw, sh, format, 0, depth));
if ((newdata = calloc(1, length)) != NULL) if (newdata != NULL)
{ {
fbGetImage((DrawablePtr) pPixmap, sx, sy, sw, sh, format, AllPlanes, newdata); fbGetImage((DrawablePtr) pPixmap, sx, sy, sw, sh, format, AllPlanes, newdata);
(*pGC->ops->PutImage)(dst, pGC, depth, dx, dy, sw, sh, 0, format, newdata); (*pGC->ops->PutImage)(dst, pGC, depth, dx, dy, sw, sh, 0, format, newdata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment