diff options
Diffstat (limited to 'render/glyph.c')
-rw-r--r-- | render/glyph.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/render/glyph.c b/render/glyph.c index 7fd3705df..975c62b77 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -573,7 +573,7 @@ FreeGlyph (GlyphPtr glyph, int format) { ScreenPtr pScreen = screenInfo.screens[i]; - (pScreen->DestroyPixmap) (GlyphPixmap (glyph)[i]); + FreePicture ((pointer) GlyphPicture (glyph)[i], 0); ps = GetPictureScreenIfSet (pScreen); if (ps) @@ -669,7 +669,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) GlyphPtr glyph; int i; - size = screenInfo.numScreens * sizeof (PixmapPtr); + size = screenInfo.numScreens * sizeof (PicturePtr); glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec)); if (!glyph) return 0; @@ -689,21 +689,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) for (i = 0; i < screenInfo.numScreens; i++) { - ScreenPtr pScreen = screenInfo.screens[i]; - - GlyphPixmap (glyph)[i] = (pScreen->CreatePixmap) (pScreen, - gi->width, gi->height, - glyphDepths[fdepth]); - if (! GlyphPixmap (glyph)[i]) - goto bail; - - ps = GetPictureScreenIfSet (pScreen); - if (! ps) - continue; + ps = GetPictureScreenIfSet (screenInfo.screens[i]); - if (!(*ps->RealizeGlyph) (pScreen, glyph)) { - (pScreen->DestroyPixmap) (GlyphPixmap (glyph)[i]); - goto bail; + if (ps) + { + if (!(*ps->RealizeGlyph) (screenInfo.screens[i], glyph)) + goto bail; } } |