summaryrefslogtreecommitdiff
path: root/src/apm_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apm_funcs.c')
-rw-r--r--src/apm_funcs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/apm_funcs.c b/src/apm_funcs.c
index 7bfb5a2..d2f9e83 100644
--- a/src/apm_funcs.c
+++ b/src/apm_funcs.c
@@ -713,9 +713,13 @@ A(TEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int w, int h,
int fg, int bg, int rop, unsigned planemask)
{
CARD32 *base, *base0;
- GlyphScanlineFuncPtr GlyphFunc = XAAGlyphScanlineFuncLSBFirst[glyphWidth - 1];
+ GlyphScanlineFuncPtr GlyphFunc;
+ static GlyphScanlineFuncPtr *GlyphTab = NULL;
int w2, h2, dwords;
+ if (!GlyphTab) GlyphTab = XAAGetGlyphScanlineFuncLSBFirst();
+ GlyphFunc = GlyphTab[glyphWidth - 1];
+
w2 = w + skipleft;
h2 = h;
dwords = (w2 + 31) >> 5;