Commit 6fd0ffc9 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXshm.c: call upstream miShmPutImage

instead of having an identical copy in nxagent_miShmPutImage
parent a9bdfd21
...@@ -490,9 +490,12 @@ ProcShmDetach(client) ...@@ -490,9 +490,12 @@ ProcShmDetach(client)
return(client->noClientException); return(client->noClientException);
} }
#ifndef NXAGENT_SERVER
static void static void
#ifdef NXAGENT_SERVER
xorg_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
#else
miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
#endif
DrawablePtr dst; DrawablePtr dst;
GCPtr pGC; GCPtr pGC;
int depth, w, h, sx, sy, sw, sh, dx, dy; int depth, w, h, sx, sy, sw, sh, dx, dy;
...@@ -525,6 +528,7 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -525,6 +528,7 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
(*pmap->drawable.pScreen->DestroyPixmap)(pmap); (*pmap->drawable.pScreen->DestroyPixmap)(pmap);
} }
#ifndef NXAGENT_SERVER
static void static void
fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
DrawablePtr dst; DrawablePtr dst;
......
...@@ -164,42 +164,6 @@ ShmExtensionInit(void) ...@@ -164,42 +164,6 @@ ShmExtensionInit(void)
} }
static void static void
nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
DrawablePtr dst;
GCPtr pGC;
int depth, w, h, sx, sy, sw, sh, dx, dy;
unsigned int format;
char *data;
{
PixmapPtr pmap;
GCPtr putGC;
putGC = GetScratchGC(depth, dst->pScreen);
if (!putGC)
{
return;
}
pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pmap)
{
FreeScratchGC(putGC);
return;
}
ValidateGC((DrawablePtr)pmap, putGC);
(*putGC->ops->PutImage)((DrawablePtr)pmap, putGC, depth, -sx, -sy, w, h, 0,
(format == XYPixmap) ? XYPixmap : ZPixmap, data);
FreeScratchGC(putGC);
if (format == XYBitmap)
(void)(*pGC->ops->CopyPlane)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh,
dx, dy, 1L);
else
(void)(*pGC->ops->CopyArea)((DrawablePtr)pmap, dst, pGC, 0, 0, sw, sh,
dx, dy);
(*pmap->drawable.pScreen->DestroyPixmap)(pmap);
}
static void
miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
DrawablePtr dst; DrawablePtr dst;
GCPtr pGC; GCPtr pGC;
...@@ -211,7 +175,7 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -211,7 +175,7 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
nxagentShmTrap = 0; nxagentShmTrap = 0;
nxagent_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data); xorg_miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data);
nxagentShmTrap = 1; nxagentShmTrap = 1;
......
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