EXA: Add a couple of missing exaPrepare/FinishAccess calls.
This commit is contained in:
parent
84eb7e6224
commit
e510a77ba4
57
exa/exa.c
57
exa/exa.c
|
@ -452,11 +452,9 @@ exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
||||||
if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width *
|
if (!pGC->tileIsPixel && FbEvenTile (pGC->tile.pixmap->drawable.width *
|
||||||
pDrawable->bitsPerPixel))
|
pDrawable->bitsPerPixel))
|
||||||
{
|
{
|
||||||
/* XXX This fixes corruption with tiled pixmaps, but may just be a
|
exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
* workaround for broken drivers
|
|
||||||
*/
|
|
||||||
exaMoveOutPixmap(pGC->tile.pixmap);
|
|
||||||
fbPadPixmap (pGC->tile.pixmap);
|
fbPadPixmap (pGC->tile.pixmap);
|
||||||
|
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
exaPixmapDirty(pGC->tile.pixmap, 0, 0,
|
exaPixmapDirty(pGC->tile.pixmap, 0, 0,
|
||||||
pGC->tile.pixmap->drawable.width,
|
pGC->tile.pixmap->drawable.width,
|
||||||
pGC->tile.pixmap->drawable.height);
|
pGC->tile.pixmap->drawable.height);
|
||||||
|
@ -467,7 +465,9 @@ exaValidateGC (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
||||||
changes &= ~GCTile;
|
changes &= ~GCTile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exaPrepareAccessGC(pGC);
|
||||||
fbValidateGC (pGC, changes, pDrawable);
|
fbValidateGC (pGC, changes, pDrawable);
|
||||||
|
exaFinishAccessGC(pGC);
|
||||||
|
|
||||||
pGC->ops = (GCOps *) &exaOps;
|
pGC->ops = (GCOps *) &exaOps;
|
||||||
}
|
}
|
||||||
|
@ -497,6 +497,47 @@ exaCreateGC (GCPtr pGC)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
exaPrepareAccessWindow(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
if (pWin->backgroundState == BackgroundPixmap)
|
||||||
|
exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
|
||||||
|
if (pWin->borderIsPixel == FALSE)
|
||||||
|
exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
exaFinishAccessWindow(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
if (pWin->backgroundState == BackgroundPixmap)
|
||||||
|
exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
|
||||||
|
if (pWin->borderIsPixel == FALSE)
|
||||||
|
exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||||
|
{
|
||||||
|
Bool ret;
|
||||||
|
|
||||||
|
exaPrepareAccessWindow(pWin);
|
||||||
|
ret = fbChangeWindowAttributes(pWin, mask);
|
||||||
|
exaFinishAccessWindow(pWin);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static RegionPtr
|
||||||
|
exaBitmapToRegion(PixmapPtr pPix)
|
||||||
|
{
|
||||||
|
RegionPtr ret;
|
||||||
|
exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC);
|
||||||
|
ret = fbPixmapToRegion(pPix);
|
||||||
|
exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's
|
* exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's
|
||||||
* screen private, before calling down to the next CloseSccreen.
|
* screen private, before calling down to the next CloseSccreen.
|
||||||
|
@ -518,6 +559,8 @@ exaCloseScreen(int i, ScreenPtr pScreen)
|
||||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||||
|
pScreen->ChangeWindowAttributes = pExaScr->SavedChangeWindowAttributes;
|
||||||
|
pScreen->BitmapToRegion = pExaScr->SavedBitmapToRegion;
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
if (ps) {
|
if (ps) {
|
||||||
ps->Composite = pExaScr->SavedComposite;
|
ps->Composite = pExaScr->SavedComposite;
|
||||||
|
@ -660,6 +703,12 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||||
pScreen->CopyWindow = exaCopyWindow;
|
pScreen->CopyWindow = exaCopyWindow;
|
||||||
|
|
||||||
|
pExaScr->SavedChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||||
|
pScreen->ChangeWindowAttributes = exaChangeWindowAttributes;
|
||||||
|
|
||||||
|
pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion;
|
||||||
|
pScreen->BitmapToRegion = exaBitmapToRegion;
|
||||||
|
|
||||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,8 @@ typedef struct {
|
||||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
||||||
CopyWindowProcPtr SavedCopyWindow;
|
CopyWindowProcPtr SavedCopyWindow;
|
||||||
|
ChangeWindowAttributesProcPtr SavedChangeWindowAttributes;
|
||||||
|
BitmapToRegionProcPtr SavedBitmapToRegion;
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
CompositeProcPtr SavedComposite;
|
CompositeProcPtr SavedComposite;
|
||||||
RasterizeTrapezoidProcPtr SavedRasterizeTrapezoid;
|
RasterizeTrapezoidProcPtr SavedRasterizeTrapezoid;
|
||||||
|
@ -113,6 +115,7 @@ typedef struct {
|
||||||
GlyphsProcPtr SavedGlyphs;
|
GlyphsProcPtr SavedGlyphs;
|
||||||
TrapezoidsProcPtr SavedTrapezoids;
|
TrapezoidsProcPtr SavedTrapezoids;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Bool swappedOut;
|
Bool swappedOut;
|
||||||
enum ExaMigrationHeuristic migration;
|
enum ExaMigrationHeuristic migration;
|
||||||
Bool hideOffscreenPixmapData;
|
Bool hideOffscreenPixmapData;
|
||||||
|
@ -190,6 +193,12 @@ typedef struct _ExaMigrationRec {
|
||||||
*/
|
*/
|
||||||
void exaDDXDriverInit (ScreenPtr pScreen);
|
void exaDDXDriverInit (ScreenPtr pScreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
exaPrepareAccessWindow(WindowPtr pWin);
|
||||||
|
|
||||||
|
void
|
||||||
|
exaFinishAccessWindow(WindowPtr pWin);
|
||||||
|
|
||||||
/* exa_unaccel.c */
|
/* exa_unaccel.c */
|
||||||
void
|
void
|
||||||
exaPrepareAccessGC(GCPtr pGC);
|
exaPrepareAccessGC(GCPtr pGC);
|
||||||
|
|
|
@ -35,10 +35,13 @@
|
||||||
*
|
*
|
||||||
* Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are
|
* Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are
|
||||||
* 1bpp and never in fb, so we don't worry about them.
|
* 1bpp and never in fb, so we don't worry about them.
|
||||||
|
* We should worry about them for completeness sake and going forward.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
exaPrepareAccessGC(GCPtr pGC)
|
exaPrepareAccessGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
|
if (pGC->stipple)
|
||||||
|
exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_SRC);
|
||||||
if (pGC->fillStyle == FillTiled)
|
if (pGC->fillStyle == FillTiled)
|
||||||
exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
}
|
}
|
||||||
|
@ -51,6 +54,8 @@ exaFinishAccessGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
if (pGC->fillStyle == FillTiled)
|
if (pGC->fillStyle == FillTiled)
|
||||||
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
if (pGC->stipple)
|
||||||
|
exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_SRC);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_TRACE_FALL
|
#if DEBUG_TRACE_FALL
|
||||||
|
@ -294,7 +299,9 @@ ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
EXA_FALLBACK(("from %p (%c)\n", pWin,
|
EXA_FALLBACK(("from %p (%c)\n", pWin,
|
||||||
exaDrawableLocation(&pWin->drawable)));
|
exaDrawableLocation(&pWin->drawable)));
|
||||||
exaPrepareAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
||||||
|
exaPrepareAccessWindow(pWin);
|
||||||
fbPaintWindow (pWin, pRegion, what);
|
fbPaintWindow (pWin, pRegion, what);
|
||||||
|
exaFinishAccessWindow(pWin);
|
||||||
exaFinishAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
exaFinishAccess (&pWin->drawable, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue