mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-05 22:46:06 +00:00
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>
This commit is contained in:
parent
2eab697adb
commit
35761d5f81
5 changed files with 33 additions and 48 deletions
17
glx/xfont.c
17
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue