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.
This commit is contained in:
Michel Dänzer 2008-08-19 11:22:40 +02:00
parent 75e495a4cd
commit 825b3fe11d

View File

@ -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);