diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-06 11:00:37 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-05-07 21:56:36 -0700 |
commit | 35761d5f811406bc0b6a68c1b02bdb699142745c (patch) | |
tree | 5286fcdbbc0fcf47f4c29ca55ee8f235bd4d23cb /glx/xfont.c | |
parent | 2eab697adba4b1858a530750e9a35fba79a7bf26 (diff) |
Introduce dixLookupFontable for "FONT or GC" parameters.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glx/xfont.c')
-rw-r--r-- | glx/xfont.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/glx/xfont.c b/glx/xfont.c index b8b466d87..e3c7f32b1 100644 --- a/glx/xfont.c +++ b/glx/xfont.c @@ -155,7 +155,6 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ClientPtr client = cl->client; xGLXUseXFontReq *req; FontPtr pFont; - GC *pGC; GLuint currentListIndex; __GLXcontext *cx; int error; @@ -181,19 +180,9 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ** containing a font. */ - error = dixLookupResourceByType((pointer *)&pFont, - req->font, RT_FONT, - client, DixReadAccess); - if (error != Success) { - error = dixLookupResourceByType((pointer *)&pGC, - req->font, RT_GC, - client, DixReadAccess); - if (error != Success) { - client->errorValue = req->font; - return error == BadGC ? BadFont : error; - } - pFont = pGC->font; - } + error = dixLookupFontable(&pFont, req->font, client, DixReadAccess); + if (error != Success) + return error; return MakeBitmapsFromFont(pFont, req->first, req->count, req->listBase); |