Remove instances of macros LOOKUP_DRAWABLE and VERIFY_DRAWABLE.
This commit is contained in:
parent
ab1886df73
commit
0cf75e7432
|
@ -1028,10 +1028,14 @@ int PanoramiXCopyArea(ClientPtr client)
|
||||||
DrawablePtr pDst;
|
DrawablePtr pDst;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
char *data;
|
char *data;
|
||||||
int pitch;
|
int pitch, rc;
|
||||||
|
|
||||||
FOR_NSCREENS(j)
|
FOR_NSCREENS(j) {
|
||||||
VERIFY_DRAWABLE(drawables[j], src->info[j].id, client);
|
rc = dixLookupDrawable(drawables+j, src->info[j].id, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
pitch = PixmapBytePad(stuff->width, drawables[0]->depth);
|
pitch = PixmapBytePad(stuff->width, drawables[0]->depth);
|
||||||
if(!(data = xcalloc(1, stuff->height * pitch)))
|
if(!(data = xcalloc(1, stuff->height * pitch)))
|
||||||
|
@ -1754,7 +1758,7 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
xGetImageReply xgi;
|
xGetImageReply xgi;
|
||||||
Bool isRoot;
|
Bool isRoot;
|
||||||
char *pBuf;
|
char *pBuf;
|
||||||
int i, x, y, w, h, format;
|
int i, x, y, w, h, format, rc;
|
||||||
Mask plane = 0, planemask;
|
Mask plane = 0, planemask;
|
||||||
int linesDone, nlines, linesPerBuf;
|
int linesDone, nlines, linesPerBuf;
|
||||||
long widthBytesLine, length;
|
long widthBytesLine, length;
|
||||||
|
@ -1775,7 +1779,10 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
if(draw->type == XRT_PIXMAP)
|
if(draw->type == XRT_PIXMAP)
|
||||||
return (*SavedProcVector[X_GetImage])(client);
|
return (*SavedProcVector[X_GetImage])(client);
|
||||||
|
|
||||||
VERIFY_DRAWABLE(pDraw, stuff->drawable, client);
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
if(!((WindowPtr)pDraw)->realized)
|
if(!((WindowPtr)pDraw)->realized)
|
||||||
return(BadMatch);
|
return(BadMatch);
|
||||||
|
@ -1809,8 +1816,12 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawables[0] = pDraw;
|
drawables[0] = pDraw;
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++)
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
|
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
xgi.visual = wVisual (((WindowPtr) pDraw));
|
xgi.visual = wVisual (((WindowPtr) pDraw));
|
||||||
xgi.type = X_Reply;
|
xgi.type = X_Reply;
|
||||||
|
|
24
Xext/shm.c
24
Xext/shm.c
|
@ -606,7 +606,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
xShmGetImageReply xgi;
|
xShmGetImageReply xgi;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
int i, x, y, w, h, format;
|
int i, x, y, w, h, format, rc;
|
||||||
Mask plane = 0, planemask;
|
Mask plane = 0, planemask;
|
||||||
long lenPer = 0, length, widthBytesLine;
|
long lenPer = 0, length, widthBytesLine;
|
||||||
Bool isRoot;
|
Bool isRoot;
|
||||||
|
@ -627,7 +627,10 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
if (draw->type == XRT_PIXMAP)
|
if (draw->type == XRT_PIXMAP)
|
||||||
return ProcShmGetImage(client);
|
return ProcShmGetImage(client);
|
||||||
|
|
||||||
VERIFY_DRAWABLE(pDraw, stuff->drawable, client);
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
|
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
|
||||||
|
|
||||||
|
@ -660,8 +663,12 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawables[0] = pDraw;
|
drawables[0] = pDraw;
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++)
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
|
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
xgi.visual = wVisual(((WindowPtr)pDraw));
|
xgi.visual = wVisual(((WindowPtr)pDraw));
|
||||||
xgi.type = X_Reply;
|
xgi.type = X_Reply;
|
||||||
|
@ -909,12 +916,12 @@ static int
|
||||||
ProcShmGetImage(client)
|
ProcShmGetImage(client)
|
||||||
register ClientPtr client;
|
register ClientPtr client;
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long lenPer = 0, length;
|
long lenPer = 0, length;
|
||||||
Mask plane = 0;
|
Mask plane = 0;
|
||||||
xShmGetImageReply xgi;
|
xShmGetImageReply xgi;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
int n;
|
int n, rc;
|
||||||
|
|
||||||
REQUEST(xShmGetImageReq);
|
REQUEST(xShmGetImageReq);
|
||||||
|
|
||||||
|
@ -924,7 +931,10 @@ ProcShmGetImage(client)
|
||||||
client->errorValue = stuff->format;
|
client->errorValue = stuff->format;
|
||||||
return(BadValue);
|
return(BadValue);
|
||||||
}
|
}
|
||||||
VERIFY_DRAWABLE(pDraw, stuff->drawable, client);
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||||
|
DixUnknownAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
|
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
|
||||||
if (pDraw->type == DRAWABLE_WINDOW)
|
if (pDraw->type == DRAWABLE_WINDOW)
|
||||||
{
|
{
|
||||||
|
|
|
@ -717,15 +717,14 @@ ProcXvGetStill(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvSelectVideoNotify(ClientPtr client)
|
ProcXvSelectVideoNotify(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
int rc;
|
||||||
REQUEST(xvSelectVideoNotifyReq);
|
REQUEST(xvSelectVideoNotifyReq);
|
||||||
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
||||||
|
|
||||||
if(!(pDraw = (DrawablePtr)LOOKUP_DRAWABLE(stuff->drawable, client) ))
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess);
|
||||||
{
|
if (rc != Success)
|
||||||
client->errorValue = stuff->drawable;
|
return rc;
|
||||||
return (BadWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff);
|
return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff);
|
||||||
|
|
||||||
|
@ -822,8 +821,8 @@ ProcXvUngrabPort(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvStopVideo(ClientPtr client)
|
ProcXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
int status;
|
int status, rc;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
REQUEST(xvStopVideoReq);
|
REQUEST(xvStopVideoReq);
|
||||||
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||||
|
@ -840,11 +839,9 @@ ProcXvStopVideo(ClientPtr client)
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(pDraw = LOOKUP_DRAWABLE(stuff->drawable, client) ))
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess);
|
||||||
{
|
if (rc != Success)
|
||||||
client->errorValue = stuff->drawable;
|
return rc;
|
||||||
return (BadDrawable);
|
|
||||||
}
|
|
||||||
|
|
||||||
return XVCALL(diStopVideo)(client, pPort, pDraw);
|
return XVCALL(diStopVideo)(client, pPort, pDraw);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue