summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-08-06 15:26:24 -0700
committerKeith Packard <keithp@keithp.com>2009-03-09 13:08:09 -0700
commitf8dd80d13bb5313a11b38b280f8ad3e22f0a6300 (patch)
treee0aea0e92304c050bb9eda0b7e4b71ad1d242e90 /render
parent0d9a42dc0380d1583889b6b6521bd5a2451735d4 (diff)
Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation.
Diffstat (limited to 'render')
-rw-r--r--render/picture.c4
-rw-r--r--render/render.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/render/picture.c b/render/picture.c
index f99c53f86..462125f05 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1070,7 +1070,7 @@ ChangePicture (PicturePtr pPicture,
pAlpha = 0;
else
{
- error = dixLookupResource((pointer *)&pAlpha, pid,
+ error = dixLookupResourceByType((pointer *)&pAlpha, pid,
PictureType, client,
DixReadAccess);
if (error != Success)
@@ -1131,7 +1131,7 @@ ChangePicture (PicturePtr pPicture,
else
{
clipType = CT_PIXMAP;
- error = dixLookupResource((pointer *)&pPixmap, pid,
+ error = dixLookupResourceByType((pointer *)&pPixmap, pid,
RT_PIXMAP, client,
DixReadAccess);
if (error != Success)
diff --git a/render/render.c b/render/render.c
index abd0a68fa..270b8fb29 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1008,7 +1008,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
LEGAL_NEW_RESOURCE(stuff->gsid, client);
- rc = dixLookupResource((pointer *)&glyphSet, stuff->existing, GlyphSetType,
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType,
client, DixGetAttrAccess);
if (rc != Success)
{
@@ -1032,7 +1032,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
REQUEST(xRenderFreeGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
- rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
client, DixDestroyAccess);
if (rc != Success)
{
@@ -1071,7 +1071,7 @@ ProcRenderAddGlyphs (ClientPtr client)
CARD32 component_alpha;
REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
- err = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ err = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
client, DixAddAccess);
if (err != Success)
{
@@ -1261,7 +1261,7 @@ ProcRenderFreeGlyphs (ClientPtr client)
CARD32 glyph;
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
- rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
+ rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
client, DixRemoveAccess);
if (rc != Success)
{