From e0bb33b3d2e4f54cf20853cde9a1664a7dbd0dc7 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 27 Sep 2007 14:50:28 +0100 Subject: Fix bug #12286 --- fb/fbarc.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'fb') 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 -- cgit v1.2.3 From c11a27ef85674f1e77ffa7f083646b848e1dc0b8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 27 Sep 2007 14:54:40 +0100 Subject: Add the FB_ACCESS_WRAPPER checks --- fb/fbarc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fb') diff --git a/fb/fbarc.c b/fb/fbarc.c index faf2628b3..f89b81c52 100644 --- a/fb/fbarc.c +++ b/fb/fbarc.c @@ -75,7 +75,9 @@ fbPolyArc (DrawablePtr pDrawable, cclip = fbGetCompositeClip (pGC); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); +#ifdef FB_ACCESS_WRAPPER wrapped = 1; +#endif while (narcs--) { if (miCanZeroArc (parcs)) @@ -99,34 +101,42 @@ fbPolyArc (DrawablePtr pDrawable, box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) { +#ifdef FB_ACCESS_WRAPPER if (!wrapped) { fbPrepareAccess (pDrawable); wrapped = 1; } +#endif (*arc) (dst, dstStride, dstBpp, parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, pPriv->and, pPriv->xor); } else { +#ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess (pDrawable); wrapped = 0; } +#endif miZeroPolyArc(pDrawable, pGC, 1, parcs); } } else { +#ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess (pDrawable); wrapped = 0; } +#endif miPolyArc(pDrawable, pGC, 1, parcs); } parcs++; } +#ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess (pDrawable); wrapped = 0; } +#endif } else #endif -- cgit v1.2.3 From a5bd536869f646e4024befa84f6e677b990310bc Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 18 Sep 2007 18:28:25 +0200 Subject: fbcmap_mi.c: add a missing api * fb/fbcmap_mi.c: (fbSetVisualTypesAndMasks): added this entry point that was missing. This is useful so that servers using this entry point can use fbcmap_mi.c, and be obliged to stick to fbcmap.c. Note that fbcmap.c does implement this entry point. Up to now, kdrive based server could not use fbcmap_mi.c because this entry point was missing. The will allow Xephyr to properly use GL. --- fb/fbcmap_mi.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fb') diff --git a/fb/fbcmap_mi.c b/fb/fbcmap_mi.c index 58bcae3aa..188decd4c 100644 --- a/fb/fbcmap_mi.c +++ b/fb/fbcmap_mi.c @@ -103,6 +103,14 @@ fbSetVisualTypes (int depth, int visuals, int bitsPerRGB) return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); } +Bool +fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask) +{ + return miSetVisualTypesAndMasks(depth, visuals, bitsPerRGB, -1, + redMask, greenMask, blueMask); +} + /* * Given a list of formats for a screen, create a list * of visuals and depths for the screen which coorespond to -- cgit v1.2.3