diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2007-09-27 14:50:28 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2007-09-27 14:55:40 +0100 |
commit | e0bb33b3d2e4f54cf20853cde9a1664a7dbd0dc7 (patch) | |
tree | b4402990f80b91292b4a1a16a6e94e66989fe229 | |
parent | 6d5c1e0d896666bcb2b3c1de7bfa424f140be364 (diff) |
Fix bug #12286
-rw-r--r-- | fb/fbarc.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/fb/fbarc.c b/fb/fbarc.c index 3f46bd4b2..faf2628b3 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 |