aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/dmxpict.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-12 20:34:06 +0000
committermarha <marha@users.sourceforge.net>2010-12-12 20:34:06 +0000
commitd3ae6e21a12209f5c8cb8c84ba0f68fb69736844 (patch)
tree62710b8524ebc7675ebd7f4976fd7f9530ce5df2 /xorg-server/hw/dmx/dmxpict.c
parent0be679f7724e33c2761ebb67846707fb3351167b (diff)
parent3a20d23b48c1051e1f22295fd886cc7f643417f6 (diff)
downloadvcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.tar.gz
vcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.tar.bz2
vcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/dmx/dmxpict.c')
-rw-r--r--xorg-server/hw/dmx/dmxpict.c54
1 files changed, 33 insertions, 21 deletions
diff --git a/xorg-server/hw/dmx/dmxpict.c b/xorg-server/hw/dmx/dmxpict.c
index 25d923f01..3f5cd4a50 100644
--- a/xorg-server/hw/dmx/dmxpict.c
+++ b/xorg-server/hw/dmx/dmxpict.c
@@ -271,9 +271,11 @@ static int dmxProcRenderCreateGlyphSet(ClientPtr client)
/* Look up glyphSet that was just created ???? */
/* Store glyphsets from backends in glyphSet->devPrivate ????? */
/* Make sure we handle all errors here!! */
-
- glyphSet = SecurityLookupIDByType(client, stuff->gsid, GlyphSetType,
- DixDestroyAccess);
+
+ dixLookupResourceByType((pointer*) &glyphSet,
+ stuff->gsid, GlyphSetType,
+ client, DixDestroyAccess);
+
glyphPriv = malloc(sizeof(dmxGlyphPrivRec));
if (!glyphPriv) return BadAlloc;
glyphPriv->glyphSets = NULL;
@@ -314,8 +316,9 @@ static int dmxProcRenderFreeGlyphSet(ClientPtr client)
REQUEST(xRenderFreeGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
- glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
- DixDestroyAccess);
+ dixLookupResourceByType((pointer*) &glyphSet,
+ stuff->glyphset, GlyphSetType,
+ client, DixDestroyAccess);
if (glyphSet && glyphSet->refcnt == 1) {
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
@@ -357,8 +360,9 @@ static int dmxProcRenderAddGlyphs(ClientPtr client)
CARD8 *bits;
int nbytes;
- glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
- GlyphSetType, DixReadAccess);
+ dixLookupResourceByType((pointer*) &glyphSet,
+ stuff->glyphset, GlyphSetType,
+ client, DixReadAccess);
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
nglyphs = stuff->nglyphs;
@@ -400,8 +404,9 @@ static int dmxProcRenderFreeGlyphs(ClientPtr client)
REQUEST(xRenderFreeGlyphsReq);
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
- glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
- DixWriteAccess);
+ dixLookupResourceByType((pointer*) &glyphSet,
+ stuff->glyphset, GlyphSetType,
+ client, DixWriteAccess);
if (glyphSet) {
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
@@ -472,14 +477,18 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
GlyphSetPtr glyphSet;
dmxGlyphPrivPtr glyphPriv;
- pSrc = SecurityLookupIDByType(client, stuff->src, PictureType,
- DixReadAccess);
+ dixLookupResourceByType((pointer*) &pSrc,
+ stuff->src, PictureType,
+ client, DixReadAccess);
+
pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
if (!pSrcPriv->pict)
return ret;
- pDst = SecurityLookupIDByType(client, stuff->dst, PictureType,
- DixWriteAccess);
+ dixLookupResourceByType((pointer*) &pDst,
+ stuff->dst, PictureType,
+ client, DixWriteAccess);
+
pDstPriv = DMX_GET_PICT_PRIV(pDst);
if (!pDstPriv->pict)
return ret;
@@ -495,8 +504,9 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
return ret;
if (stuff->maskFormat)
- pFmt = SecurityLookupIDByType(client, stuff->maskFormat,
- PictFormatType, DixReadAccess);
+ dixLookupResourceByType((pointer*) &pFmt,
+ stuff->maskFormat, PictFormatType,
+ client, DixReadAccess);
else
pFmt = NULL;
@@ -546,8 +556,9 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
curGlyph = glyphs;
curElt = elts;
- glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
- GlyphSetType, DixReadAccess);
+ dixLookupResourceByType((pointer*) &glyphSet,
+ stuff->glyphset, GlyphSetType,
+ client, DixReadAccess);
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
while (buffer + sizeof(xGlyphElt) < end) {
@@ -555,10 +566,11 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
buffer += sizeof(xGlyphElt);
if (elt->len == 0xff) {
- glyphSet = SecurityLookupIDByType(client,
- *((CARD32 *)buffer),
- GlyphSetType,
- DixReadAccess);
+ dixLookupResourceByType((pointer*) &glyphSet,
+ *((CARD32 *)buffer),
+ GlyphSetType,
+ client,
+ DixReadAccess);
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
buffer += 4;
} else {