Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph
implementation to avoid unprepared access to the tile. Also, relocate the fbGetDrawable to avoid using a stale dest pointer after exaSolidBoxClipped() may have migrated it. Revealed by xtest.
This commit is contained in:
parent
c720ffe875
commit
5f95146fcf
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-04-01 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* exa/exa_accel.c: (exaImageGlyphBlt):
|
||||
* exa/exa_priv.h:
|
||||
* exa/exa_unaccel.c:
|
||||
Export exaPrepare/FinishGC to the rest of EXA, and use it in the
|
||||
ImageGlyph implementation to avoid unprepared access to the tile. Also,
|
||||
relocate the fbGetDrawable to avoid using a stale dest pointer after
|
||||
exaSolidBoxClipped() may have migrated it. Revealed by xtest.
|
||||
|
||||
2006-04-01 Eric Anholt <anholt@FreeBSD.org>
|
||||
|
||||
* exa/exa_priv.h:
|
||||
|
|
|
@ -695,8 +695,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
return;
|
||||
}
|
||||
glyph = NULL;
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
switch (dstBpp) {
|
||||
switch (pDrawable->bitsPerPixel) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
case 16: glyph = fbGlyph16; break;
|
||||
case 24: glyph = fbGlyph24; break;
|
||||
|
@ -742,6 +741,9 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
|
||||
EXA_FALLBACK(("to 0x%lx\n", (long)pDrawable));
|
||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
exaPrepareAccessGC (pGC);
|
||||
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
|
||||
ppci = ppciInit;
|
||||
while (nglyph--)
|
||||
|
@ -787,6 +789,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
|||
}
|
||||
x += pci->metrics.characterWidth;
|
||||
}
|
||||
exaFinishAccessGC (pGC);
|
||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,6 +188,12 @@ typedef struct _ExaMigrationRec {
|
|||
void exaDDXDriverInit (ScreenPtr pScreen);
|
||||
|
||||
/* exa_unaccel.c */
|
||||
void
|
||||
exaPrepareAccessGC(GCPtr pGC);
|
||||
|
||||
void
|
||||
exaFinishAccessGC(GCPtr pGC);
|
||||
|
||||
void
|
||||
ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
|
||||
DDXPointPtr ppt, int *pwidth, int fSorted);
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are
|
||||
* 1bpp and never in fb, so we don't worry about them.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
exaPrepareAccessGC(GCPtr pGC)
|
||||
{
|
||||
if (pGC->fillStyle == FillTiled)
|
||||
|
@ -46,7 +46,7 @@ exaPrepareAccessGC(GCPtr pGC)
|
|||
/**
|
||||
* Finishes access to the tile in the GC, if used.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
exaFinishAccessGC(GCPtr pGC)
|
||||
{
|
||||
if (pGC->fillStyle == FillTiled)
|
||||
|
|
Loading…
Reference in New Issue
Block a user