From 825b3fe11d1b813bf8d5b24a880ed04b78ae1acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 19 Aug 2008 11:22:40 +0200 Subject: [PATCH] EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook. It's buggy without Composite acceleration (leading to cropped glyphs) and not really useful in that case anyway. The bug probably still needs to be found and fixed for drivers that provide a PrepareComposite hook but can't accelerate text rendering though. --- exa/exa.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index e1bbb3238..37a0bb055 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -752,7 +752,8 @@ exaCloseScreen(int i, ScreenPtr pScreen) PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - exaGlyphsFini(pScreen); + if (ps->Glyphs == exaGlyphs) + exaGlyphsFini(pScreen); pScreen->CreateGC = pExaScr->SavedCreateGC; pScreen->CloseScreen = pExaScr->SavedCloseScreen; @@ -931,8 +932,10 @@ exaDriverInit (ScreenPtr pScreen, pExaScr->SavedComposite = ps->Composite; ps->Composite = exaComposite; - pExaScr->SavedGlyphs = ps->Glyphs; - ps->Glyphs = exaGlyphs; + if (pScreenInfo->PrepareComposite) { + pExaScr->SavedGlyphs = ps->Glyphs; + ps->Glyphs = exaGlyphs; + } pExaScr->SavedTriangles = ps->Triangles; ps->Triangles = exaTriangles; @@ -993,7 +996,8 @@ exaDriverInit (ScreenPtr pScreen, } } - exaGlyphsInit(pScreen); + if (ps->Glyphs == exaGlyphs) + exaGlyphsInit(pScreen); LogMessage(X_INFO, "EXA(%d): Driver registered support for the following" " operations:\n", pScreen->myNum);