exa: All fallbacks should have a GC, remove some code.
- I did some testing with full fallbacks forced by the driver. - I ran rendercheck, expedite and the (full) x11perf test suite. - Thanks to ajax for pointing out this should be unneeded.
This commit is contained in:
parent
d591c7d1b8
commit
30daba6903
|
@ -533,21 +533,8 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We need a pGC to call our fallback. */
|
|
||||||
if (!pGC) {
|
|
||||||
pExaScr->fallback_flags |= EXA_FALLBACK_NOGC;
|
|
||||||
pGC = CreateScratchGC(pDstDrawable->pScreen, pDstDrawable->depth);
|
|
||||||
if (!pGC)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* fallback */
|
/* fallback */
|
||||||
ExaCheckCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure);
|
ExaCheckCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure);
|
||||||
|
|
||||||
if (pExaScr->fallback_flags & EXA_FALLBACK_NOGC) {
|
|
||||||
pExaScr->fallback_flags &= ~EXA_FALLBACK_NOGC;
|
|
||||||
FreeScratchGC(pGC);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
|
|
@ -129,7 +129,6 @@ typedef struct {
|
||||||
|
|
||||||
#define EXA_FALLBACK_COPYWINDOW (1 << 0)
|
#define EXA_FALLBACK_COPYWINDOW (1 << 0)
|
||||||
#define EXA_ACCEL_COPYWINDOW (1 << 1)
|
#define EXA_ACCEL_COPYWINDOW (1 << 1)
|
||||||
#define EXA_FALLBACK_NOGC (1 << 2)
|
|
||||||
|
|
||||||
typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
|
typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -116,19 +116,6 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
||||||
EXA_GC_EPILOGUE(pGC);
|
EXA_GC_EPILOGUE(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sometimes we need a pGC to call a function, but don't actually want the lower
|
|
||||||
* layer to do something with the contents of this fake GC. */
|
|
||||||
static inline GCPtr
|
|
||||||
ExaCheckWantGC(DrawablePtr pDrawable, GCPtr pGC)
|
|
||||||
{
|
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
|
||||||
|
|
||||||
if (pExaScr->fallback_flags & EXA_FALLBACK_NOGC)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return pGC;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
||||||
BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
|
BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
|
||||||
|
@ -141,7 +128,7 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
||||||
exaPrepareAccess (pSrc, EXA_PREPARE_SRC);
|
exaPrepareAccess (pSrc, EXA_PREPARE_SRC);
|
||||||
/* This will eventually call fbCopyNtoN, with some calculation overhead. */
|
/* This will eventually call fbCopyNtoN, with some calculation overhead. */
|
||||||
while (nbox--) {
|
while (nbox--) {
|
||||||
pGC->ops->CopyArea (pSrc, pDst, ExaCheckWantGC(pDst, pGC), pbox->x1 - pSrc->x + dx, pbox->y1 - pSrc->y + dy,
|
pGC->ops->CopyArea (pSrc, pDst, pGC, pbox->x1 - pSrc->x + dx, pbox->y1 - pSrc->y + dy,
|
||||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, pbox->x1 - pDst->x, pbox->y1 - pDst->y);
|
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, pbox->x1 - pDst->x, pbox->y1 - pDst->y);
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user