diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
commit | a90ee792d96752ad1b71b9ada922fa6afe478c99 (patch) | |
tree | 6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/glx/xfont.c | |
parent | bc97d4ecc0aa9e1b823565b07282f848700bd11a (diff) |
Upgrade to xorg-server 1.9.2.
Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations
including multihead with both zaphod and xrandr.
Diffstat (limited to 'xserver/glx/xfont.c')
-rw-r--r-- | xserver/glx/xfont.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/xserver/glx/xfont.c b/xserver/glx/xfont.c index b8b466d87..b4081cfd4 100644 --- a/xserver/glx/xfont.c +++ b/xserver/glx/xfont.c @@ -46,8 +46,6 @@ #include <windowstr.h> #include <dixfontstr.h> -extern XID clientErrorValue; /* imported kludge from dix layer */ - /* ** Make a single GL bitmap from a single X glyph */ @@ -76,7 +74,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) p = buf; allocbuf = 0; } else { - p = (unsigned char *) xalloc(allocBytes); + p = (unsigned char *) malloc(allocBytes); if (!p) return BadAlloc; allocbuf = p; @@ -99,9 +97,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf) ); - if (allocbuf) { - xfree(allocbuf); - } + free(allocbuf); return Success; #undef __GL_CHAR_BUF_SIZE } @@ -155,7 +151,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 +176,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); |