summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-10-17 15:00:54 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-10-17 15:00:54 -0400
commitc3f7b862550fa8f46633162f83db8c27e46fc672 (patch)
treea8427c93c96af2bbf2133b07f2510ff31560e54d /fb
parentaf4dde0ac19ecec1d0ad988eb25b15401e7c6b36 (diff)
parentfeac0759522cbdc3e61ccfa373df735903c5cb27 (diff)
Merge branch 'master' into XACE-SELINUX
Conflicts: os/access.c
Diffstat (limited to 'fb')
-rw-r--r--fb/fbarc.c37
-rw-r--r--fb/fbcmap_mi.c8
2 files changed, 41 insertions, 4 deletions
diff --git a/fb/fbarc.c b/fb/fbarc.c
index 3f46bd4b2..f89b81c52 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -71,9 +71,13 @@ fbPolyArc (DrawablePtr pDrawable,
BoxRec box;
int x2, y2;
RegionPtr cclip;
+ int wrapped = 0;
cclip = fbGetCompositeClip (pGC);
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
+#ifdef FB_ACCESS_WRAPPER
+ wrapped = 1;
+#endif
while (narcs--)
{
if (miCanZeroArc (parcs))
@@ -96,18 +100,43 @@ 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) ) {
+#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
+ } else {
+#ifdef FB_ACCESS_WRAPPER
+ if (wrapped) {
+ fbFinishAccess (pDrawable);
+ wrapped = 0;
+ }
+#endif
miZeroPolyArc(pDrawable, pGC, 1, parcs);
+ }
}
- else
+ else {
+#ifdef FB_ACCESS_WRAPPER
+ if (wrapped) {
+ fbFinishAccess (pDrawable);
+ wrapped = 0;
+ }
+#endif
miPolyArc(pDrawable, pGC, 1, parcs);
+ }
parcs++;
}
- fbFinishAccess (pDrawable);
+#ifdef FB_ACCESS_WRAPPER
+ if (wrapped) {
+ fbFinishAccess (pDrawable);
+ wrapped = 0;
+ }
+#endif
}
else
#endif
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