diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index d793ec2..1dacce6 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -188,6 +188,12 @@ ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *pArcs) { EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + + /* Disable this as fbPolyArc can call miZeroPolyArc which in turn + * can call accelerated functions, that as yet, haven't been notified + * with exaFinishAccess(). + */ + #if 0 if (pGC->lineWidth == 0) { exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); @@ -197,6 +203,7 @@ ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC, exaFinishAccess (pDrawable, EXA_PREPARE_DEST); return; } + #endif miPolyArc (pDrawable, pGC, narcs, pArcs); } diff --git a/fb/fbarc.c b/fb/fbarc.c index 3f46bd4..faf2628 100644 --- a/fb/fbarc.c +++ b/fb/fbarc.c @@ -71,9 +71,11 @@ fbPolyArc (DrawablePtr pDrawable, BoxRec box; int x2, y2; RegionPtr cclip; + int wrapped = 0; cclip = fbGetCompositeClip (pGC); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + wrapped = 1; while (narcs--) { if (miCanZeroArc (parcs)) @@ -96,18 +98,35 @@ fbPolyArc (DrawablePtr pDrawable, y2 = box.y1 + (int)parcs->height + 1; box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && - (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) + (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) { + if (!wrapped) { + fbPrepareAccess (pDrawable); + wrapped = 1; + } (*arc) (dst, dstStride, dstBpp, parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, pPriv->and, pPriv->xor); - else + } else { + if (wrapped) { + fbFinishAccess (pDrawable); + wrapped = 0; + } miZeroPolyArc(pDrawable, pGC, 1, parcs); + } } - else + else { + if (wrapped) { + fbFinishAccess (pDrawable); + wrapped = 0; + } miPolyArc(pDrawable, pGC, 1, parcs); + } parcs++; } - fbFinishAccess (pDrawable); + if (wrapped) { + fbFinishAccess (pDrawable); + wrapped = 0; + } } else #endif