From 35761d5f811406bc0b6a68c1b02bdb699142745c Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Thu, 6 May 2010 11:00:37 -0700 Subject: Introduce dixLookupFontable for "FONT or GC" parameters. Signed-off-by: Jamey Sharp Reviewed-by: Julien Cristau Reviewed-by: Adam Jackson Signed-off-by: Keith Packard --- glx/xfont.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'glx') 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); -- cgit v1.2.3