summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/xaa
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-12-05 15:36:12 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-12-05 15:36:12 +0000
commita90ee792d96752ad1b71b9ada922fa6afe478c99 (patch)
tree6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/hw/xfree86/xaa
parentbc97d4ecc0aa9e1b823565b07282f848700bd11a (diff)
Upgrade to xorg-server 1.9.2.
Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations including multihead with both zaphod and xrandr.
Diffstat (limited to 'xserver/hw/xfree86/xaa')
-rw-r--r--xserver/hw/xfree86/xaa/Makefile.in30
-rw-r--r--xserver/hw/xfree86/xaa/xaa.h7
-rw-r--r--xserver/hw/xfree86/xaa/xaaBitBlt.c38
-rw-r--r--xserver/hw/xfree86/xaa/xaaCpyArea.c38
-rw-r--r--xserver/hw/xfree86/xaa/xaaCpyPlane.c20
-rw-r--r--xserver/hw/xfree86/xaa/xaaCpyWin.c20
-rw-r--r--xserver/hw/xfree86/xaa/xaaDashLine.c4
-rw-r--r--xserver/hw/xfree86/xaa/xaaFillArc.c4
-rw-r--r--xserver/hw/xfree86/xaa/xaaFillPoly.c12
-rw-r--r--xserver/hw/xfree86/xaa/xaaFillRect.c24
-rw-r--r--xserver/hw/xfree86/xaa/xaaGC.c7
-rw-r--r--xserver/hw/xfree86/xaa/xaaImage.c8
-rw-r--r--xserver/hw/xfree86/xaa/xaaInit.c67
-rw-r--r--xserver/hw/xfree86/xaa/xaaInitAccel.c4
-rw-r--r--xserver/hw/xfree86/xaa/xaaLine.c4
-rw-r--r--xserver/hw/xfree86/xaa/xaaLineMisc.c5
-rw-r--r--xserver/hw/xfree86/xaa/xaaNonTEText.c28
-rw-r--r--xserver/hw/xfree86/xaa/xaaOffscreen.c8
-rw-r--r--xserver/hw/xfree86/xaa/xaaOverlay.c22
-rw-r--r--xserver/hw/xfree86/xaa/xaaOverlayDF.c47
-rw-r--r--xserver/hw/xfree86/xaa/xaaPCache.c72
-rw-r--r--xserver/hw/xfree86/xaa/xaaPict.c44
-rw-r--r--xserver/hw/xfree86/xaa/xaaRect.c4
-rw-r--r--xserver/hw/xfree86/xaa/xaaSpans.c10
-rw-r--r--xserver/hw/xfree86/xaa/xaaStateChange.c13
-rw-r--r--xserver/hw/xfree86/xaa/xaaTEGlyph.c8
-rw-r--r--xserver/hw/xfree86/xaa/xaaTEText.c17
-rw-r--r--xserver/hw/xfree86/xaa/xaaWideLine.c8
-rw-r--r--xserver/hw/xfree86/xaa/xaaWrapper.c27
-rw-r--r--xserver/hw/xfree86/xaa/xaalocal.h9
-rw-r--r--xserver/hw/xfree86/xaa/xaawrap.h4
31 files changed, 290 insertions, 323 deletions
diff --git a/xserver/hw/xfree86/xaa/Makefile.in b/xserver/hw/xfree86/xaa/Makefile.in
index d0c8f784a..c92132eaa 100644
--- a/xserver/hw/xfree86/xaa/Makefile.in
+++ b/xserver/hw/xfree86/xaa/Makefile.in
@@ -139,10 +139,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@
BUILD_DATE = @BUILD_DATE@
BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@
BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@
-BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@
-BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@
-BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@
-BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@
BUILD_TIME = @BUILD_TIME@
CC = @CC@
CCAS = @CCAS@
@@ -230,6 +226,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@
+ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FBDEVHW_FALSE = @FBDEVHW_FALSE@
@@ -244,6 +242,7 @@ FONTOTFDIR = @FONTOTFDIR@
FONTROOTDIR = @FONTROOTDIR@
FONTTTFDIR = @FONTTTFDIR@
FONTTYPE1DIR = @FONTTYPE1DIR@
+FOP = @FOP@
FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@
FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@
GLIB_CFLAGS = @GLIB_CFLAGS@
@@ -261,10 +260,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@
HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@
HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
-HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@
-HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@
+HAVE_FOP_FALSE = @HAVE_FOP_FALSE@
+HAVE_FOP_TRUE = @HAVE_FOP_TRUE@
HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@
HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@
+HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@
+HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@
+HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@
+HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@
HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@
HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@
HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@
@@ -320,10 +323,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIBS = @LIBDRM_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
+LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LINUXDOC = @LINUXDOC@
LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@
LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@
LINUX_IA64_FALSE = @LINUX_IA64_FALSE@
@@ -341,17 +345,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
-MAKE_HTML = @MAKE_HTML@
-MAKE_PDF = @MAKE_PDF@
-MAKE_PS = @MAKE_PS@
-MAKE_TEXT = @MAKE_TEXT@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MITSHM_FALSE = @MITSHM_FALSE@
MITSHM_TRUE = @MITSHM_TRUE@
-MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@
-MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@
NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@
NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@
NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@
@@ -378,20 +376,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
PERL = @PERL@
+PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
+PIXMAN_LIBS = @PIXMAN_LIBS@
PKG_CONFIG = @PKG_CONFIG@
PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@
PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@
PROJECTROOT = @PROJECTROOT@
-PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
RECORD_FALSE = @RECORD_FALSE@
RECORD_TRUE = @RECORD_TRUE@
+RELEASE_DATE = @RELEASE_DATE@
RES_FALSE = @RES_FALSE@
RES_TRUE = @RES_TRUE@
SCREENSAVER_FALSE = @SCREENSAVER_FALSE@
SCREENSAVER_TRUE = @SCREENSAVER_TRUE@
+SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
SECURE_RPC_FALSE = @SECURE_RPC_FALSE@
SECURE_RPC_TRUE = @SECURE_RPC_TRUE@
SED = @SED@
@@ -483,6 +484,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
XLIB_CFLAGS = @XLIB_CFLAGS@
XLIB_LIBS = @XLIB_LIBS@
+XMLTO = @XMLTO@
XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_FALSE = @XNEST_FALSE@
diff --git a/xserver/hw/xfree86/xaa/xaa.h b/xserver/hw/xfree86/xaa/xaa.h
index 7db6b95d5..2af954fee 100644
--- a/xserver/hw/xfree86/xaa/xaa.h
+++ b/xserver/hw/xfree86/xaa/xaa.h
@@ -108,9 +108,7 @@
#include "regionstr.h"
#include "xf86fbman.h"
-#ifdef RENDER
#include "picturestr.h"
-#endif
/* Flags */
#define PIXMAP_CACHE 0x00000001
@@ -1251,7 +1249,6 @@ typedef struct _XAAInfoRec {
CARD32 FullPlanemasks[32];
-#ifdef RENDER
Bool (*Composite) (
CARD8 op,
PicturePtr pSrc,
@@ -1336,13 +1333,10 @@ typedef struct _XAAInfoRec {
CARD32 * CPUToScreenTextureFormats;
-#endif
-
/* these were added for 4.3.0 */
BoxRec SolidLineLimits;
BoxRec DashedLineLimits;
-#ifdef RENDER
/* These were added for X.Org 6.8.0 */
Bool (*SetupForCPUToScreenAlphaTexture2) (
ScrnInfoPtr pScrn,
@@ -1373,7 +1367,6 @@ typedef struct _XAAInfoRec {
int flags
);
CARD32 *CPUToScreenTextureDstFormats;
-#endif /* RENDER */
} XAAInfoRec, *XAAInfoRecPtr;
#define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
diff --git a/xserver/hw/xfree86/xaa/xaaBitBlt.c b/xserver/hw/xfree86/xaa/xaaBitBlt.c
index ebba74e55..5148ed4a2 100644
--- a/xserver/hw/xfree86/xaa/xaaBitBlt.c
+++ b/xserver/hw/xfree86/xaa/xaaBitBlt.c
@@ -118,8 +118,8 @@ XAABitBlt(
fastExpose = 0;
}
} else {
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip);
+ RegionInit(&rgnDst, &fastBox, 1);
+ RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip);
}
dstx += pDstDrawable->x;
@@ -128,9 +128,9 @@ XAABitBlt(
if (pDstDrawable->type == DRAWABLE_WINDOW) {
if (!((WindowPtr)pDstDrawable)->realized) {
if (!fastClip)
- REGION_UNINIT(pGC->pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
return NULL;
}
}
@@ -153,8 +153,8 @@ XAABitBlt(
blown region and call intersect */
cclip = pGC->pCompositeClip;
- if (REGION_NUM_RECTS(cclip) == 1) {
- BoxPtr pBox = REGION_RECTS(cclip);
+ if (RegionNumRects(cclip) == 1) {
+ BoxPtr pBox = RegionRects(cclip);
if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1;
if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2;
@@ -163,37 +163,37 @@ XAABitBlt(
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) {
- REGION_NULL(pGC->pScreen, &rgnDst);
+ RegionNull(&rgnDst);
} else {
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
+ RegionInit(&rgnDst, &fastBox, 1);
}
} else {
/* We must turn off fastClip now, since we must create
a full blown region. It is intersected with the
composite clip below. */
fastClip = 0;
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1);
+ RegionInit(&rgnDst, &fastBox,1);
}
} else {
- REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
+ RegionTranslate(&rgnDst, -dx, -dy);
}
if (!fastClip) {
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst,
+ RegionIntersect(&rgnDst, &rgnDst,
pGC->pCompositeClip);
}
/* Do bit blitting */
- numRects = REGION_NUM_RECTS(&rgnDst);
+ numRects = RegionNumRects(&rgnDst);
if (numRects && width && height) {
- if(!(pptSrc = (DDXPointPtr)xalloc(numRects *
+ if(!(pptSrc = (DDXPointPtr)malloc(numRects *
sizeof(DDXPointRec)))) {
- REGION_UNINIT(pGC->pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
return NULL;
}
- pbox = REGION_RECTS(&rgnDst);
+ pbox = RegionRects(&rgnDst);
ppt = pptSrc;
for (i = numRects; --i >= 0; pbox++, ppt++) {
ppt->x = pbox->x1 + dx;
@@ -201,7 +201,7 @@ XAABitBlt(
}
(*doBitBlt) (pSrcDrawable, pDstDrawable, pGC, &rgnDst, pptSrc);
- xfree(pptSrc);
+ free(pptSrc);
}
prgnExposed = NULL;
@@ -214,8 +214,8 @@ XAABitBlt(
(int)origSource.height,
origDest.x, origDest.y, bitPlane);
}
- REGION_UNINIT(pGC->pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
return prgnExposed;
}
diff --git a/xserver/hw/xfree86/xaa/xaaCpyArea.c b/xserver/hw/xfree86/xaa/xaaCpyArea.c
index 6a898cd5f..bcf81ee99 100644
--- a/xserver/hw/xfree86/xaa/xaaCpyArea.c
+++ b/xserver/hw/xfree86/xaa/xaaCpyArea.c
@@ -95,8 +95,8 @@ XAADoBitBlt(
((pSrc->type == DRAWABLE_WINDOW) &&
(pDst->type == DRAWABLE_WINDOW)));
- pbox = REGION_RECTS(prgnDst);
- nbox = REGION_NUM_RECTS(prgnDst);
+ pbox = RegionRects(prgnDst);
+ nbox = RegionNumRects(prgnDst);
pboxNew1 = NULL;
pptNew1 = NULL;
@@ -108,12 +108,12 @@ XAADoBitBlt(
if (nbox > 1) {
/* keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec) * nbox);
if(!pboxNew1)
return;
- pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox);
if(!pptNew1) {
- xfree(pboxNew1);
+ free(pboxNew1);
return;
}
pboxBase = pboxNext = pbox+nbox-1;
@@ -145,14 +145,14 @@ XAADoBitBlt(
if (nbox > 1) {
/* reverse order of rects in each band */
- pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox);
if(!pboxNew2 || !pptNew2) {
- if (pptNew2) xfree(pptNew2);
- if (pboxNew2) xfree(pboxNew2);
+ free(pptNew2);
+ free(pboxNew2);
if (pboxNew1) {
- xfree(pptNew1);
- xfree(pboxNew1);
+ free(pptNew1);
+ free(pboxNew1);
}
return;
}
@@ -183,12 +183,12 @@ XAADoBitBlt(
xdir, ydir, pGC->alu, pGC->planemask);
if (pboxNew2) {
- xfree(pptNew2);
- xfree(pboxNew2);
+ free(pptNew2);
+ free(pboxNew2);
}
if (pboxNew1) {
- xfree(pptNew1);
- xfree(pboxNew1);
+ free(pptNew1);
+ free(pboxNew1);
}
}
@@ -204,8 +204,8 @@ XAADoImageWrite(
int srcwidth;
unsigned char* psrcBase; /* start of image */
unsigned char* srcPntr; /* index into the image */
- BoxPtr pbox = REGION_RECTS(prgnDst);
- int nbox = REGION_NUM_RECTS(prgnDst);
+ BoxPtr pbox = RegionRects(prgnDst);
+ int nbox = RegionNumRects(prgnDst);
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
int Bpp = pSrc->bitsPerPixel >> 3;
@@ -233,8 +233,8 @@ XAADoImageRead(
int dstwidth;
unsigned char* pdstBase; /* start of image */
unsigned char* dstPntr; /* index into the image */
- BoxPtr pbox = REGION_RECTS(prgnDst);
- int nbox = REGION_NUM_RECTS(prgnDst);
+ BoxPtr pbox = RegionRects(prgnDst);
+ int nbox = RegionNumRects(prgnDst);
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
int Bpp = pSrc->bitsPerPixel >> 3; /* wouldn't get here unless both
src and dst have same bpp */
diff --git a/xserver/hw/xfree86/xaa/xaaCpyPlane.c b/xserver/hw/xfree86/xaa/xaaCpyPlane.c
index aa4c0407c..6d2b3a008 100644
--- a/xserver/hw/xfree86/xaa/xaaCpyPlane.c
+++ b/xserver/hw/xfree86/xaa/xaaCpyPlane.c
@@ -76,8 +76,8 @@ XAACopyPlane1toNColorExpand(
DDXPointPtr pptSrc )
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- BoxPtr pbox = REGION_RECTS(rgnDst);
- int numrects = REGION_NUM_RECTS(rgnDst);
+ BoxPtr pbox = RegionRects(rgnDst);
+ int numrects = RegionNumRects(rgnDst);
unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr;
int srcwidth = ((PixmapPtr)pSrc)->devKind;
@@ -101,8 +101,8 @@ XAACopyPlaneNtoNColorExpand(
DDXPointPtr pptSrc
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- BoxPtr pbox = REGION_RECTS(rgnDst);
- int numrects = REGION_NUM_RECTS(rgnDst);
+ BoxPtr pbox = RegionRects(rgnDst);
+ int numrects = RegionNumRects(rgnDst);
unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr;
unsigned char *data, *srcPtr, *dataPtr;
int srcwidth = ((PixmapPtr)pSrc)->devKind;
@@ -131,7 +131,7 @@ XAACopyPlaneNtoNColorExpand(
h = height = pbox->y2 - pbox->y1;
pitch = BitmapBytePad(width);
- if(!(data = xcalloc(height, pitch)))
+ if(!(data = calloc(height, pitch)))
goto ALLOC_FAILED;
dataPtr = data;
@@ -151,7 +151,7 @@ XAACopyPlaneNtoNColorExpand(
pbox->x1, pbox->y1, width, height, data, pitch, 0,
pGC->fgPixel, pGC->bgPixel, pGC->alu, pGC->planemask);
- xfree(data);
+ free(data);
ALLOC_FAILED:
@@ -168,14 +168,14 @@ XAAPushPixelsSolidColorExpansion(
int xOrg, int yOrg )
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip);
+ int MaxBoxes = RegionNumRects(pGC->pCompositeClip);
BoxPtr pbox, pClipBoxes;
int nboxes, srcx, srcy;
xRectangle TheRect;
unsigned char *src = pBitMap->devPrivate.ptr;
int srcwidth = pBitMap->devKind;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
TheRect.x = xOrg;
@@ -184,7 +184,7 @@ XAAPushPixelsSolidColorExpansion(
TheRect.height = dy;
if(MaxBoxes > (infoRec->PreAllocSize/sizeof(BoxRec))) {
- pClipBoxes = xalloc(MaxBoxes * sizeof(BoxRec));
+ pClipBoxes = malloc(MaxBoxes * sizeof(BoxRec));
if(!pClipBoxes) return;
} else pClipBoxes = (BoxPtr)infoRec->PreAllocMem;
@@ -203,6 +203,6 @@ XAAPushPixelsSolidColorExpansion(
}
if(pClipBoxes != (BoxPtr)infoRec->PreAllocMem)
- xfree(pClipBoxes);
+ free(pClipBoxes);
}
diff --git a/xserver/hw/xfree86/xaa/xaaCpyWin.c b/xserver/hw/xfree86/xaa/xaaCpyWin.c
index 31c421e65..c3c2690b2 100644
--- a/xserver/hw/xfree86/xaa/xaaCpyWin.c
+++ b/xserver/hw/xfree86/xaa/xaaCpyWin.c
@@ -47,20 +47,20 @@ XAACopyWindow(
return;
}
- pwinRoot = WindowTable[pScreen->myNum];
+ pwinRoot = pScreen->root;
- REGION_NULL(pScreen, &rgnDst);
+ RegionNull(&rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
- pbox = REGION_RECTS(&rgnDst);
- nbox = REGION_NUM_RECTS(&rgnDst);
+ pbox = RegionRects(&rgnDst);
+ nbox = RegionNumRects(&rgnDst);
if(!nbox ||
- !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
- REGION_UNINIT(pScreen, &rgnDst);
+ !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) {
+ RegionUninit(&rgnDst);
return;
}
ppt = pptSrc;
@@ -77,6 +77,6 @@ XAACopyWindow(
XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- xfree(pptSrc);
- REGION_UNINIT(pScreen, &rgnDst);
+ free(pptSrc);
+ RegionUninit(&rgnDst);
}
diff --git a/xserver/hw/xfree86/xaa/xaaDashLine.c b/xserver/hw/xfree86/xaa/xaaDashLine.c
index 63233e05d..e84708449 100644
--- a/xserver/hw/xfree86/xaa/xaaDashLine.c
+++ b/xserver/hw/xfree86/xaa/xaaDashLine.c
@@ -37,8 +37,8 @@ XAAPolyLinesDashed(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates,
XAAGetGCKey());
- BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip);
- int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip);
+ BoxPtr pboxInit = RegionRects(pGC->pCompositeClip);
+ int nboxInit = RegionNumRects(pGC->pCompositeClip);
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
int xorg = pDrawable->x;
int yorg = pDrawable->y;
diff --git a/xserver/hw/xfree86/xaa/xaaFillArc.c b/xserver/hw/xfree86/xaa/xaaFillArc.c
index d83922ce0..47d804108 100644
--- a/xserver/hw/xfree86/xaa/xaaFillArc.c
+++ b/xserver/hw/xfree86/xaa/xaaFillArc.c
@@ -171,7 +171,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
cclip = pGC->pCompositeClip;
- if(!REGION_NUM_RECTS(cclip))
+ if(!RegionNumRects(cclip))
return;
for (arc = parcs, i = narcs; --i >= 0; arc++)
@@ -198,7 +198,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
y2 = box.y1 + (int)arc->height + 1;
box.y2 = y2;
if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) &&
- (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) )
+ (RegionContainsRect(cclip, &box) == rgnIN) )
{
if ((arc->angle2 >= FULLCIRCLE) ||
(arc->angle2 <= -FULLCIRCLE))
diff --git a/xserver/hw/xfree86/xaa/xaaFillPoly.c b/xserver/hw/xfree86/xaa/xaaFillPoly.c
index 6f11e35ff..289a3cab1 100644
--- a/xserver/hw/xfree86/xaa/xaaFillPoly.c
+++ b/xserver/hw/xfree86/xaa/xaaFillPoly.c
@@ -213,7 +213,7 @@ XAAFillPolygonSolid(
int c, y, maxy, h, yoffset;
DDXPointPtr topPoint;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
if (mode == CoordModePrevious) {
@@ -226,7 +226,7 @@ XAAFillPolygonSolid(
mode = CoordModeOrigin;
}
- if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) {
+ if (RegionNumRects(pGC->pCompositeClip) != 1) {
miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn);
return;
}
@@ -676,7 +676,7 @@ XAAFillPolygonStippled(
RectFuncPtr RectFunc = NULL;
TrapFuncPtr TrapFunc = NULL;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
if (mode == CoordModePrevious) {
@@ -689,7 +689,7 @@ XAAFillPolygonStippled(
mode = CoordModeOrigin;
}
- if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) {
+ if (RegionNumRects(pGC->pCompositeClip) != 1) {
miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn);
return;
}
@@ -836,7 +836,7 @@ XAAFillPolygonTiled(
RectFuncPtr RectFunc = NULL;
TrapFuncPtr TrapFunc = NULL;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
if (mode == CoordModePrevious) {
@@ -849,7 +849,7 @@ XAAFillPolygonTiled(
mode = CoordModeOrigin;
}
- if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) {
+ if (RegionNumRects(pGC->pCompositeClip) != 1) {
miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn);
return;
}
diff --git a/xserver/hw/xfree86/xaa/xaaFillRect.c b/xserver/hw/xfree86/xaa/xaaFillRect.c
index 0b83ef3ee..e1fecab01 100644
--- a/xserver/hw/xfree86/xaa/xaaFillRect.c
+++ b/xserver/hw/xfree86/xaa/xaaFillRect.c
@@ -40,7 +40,7 @@ XAAPolyFillRect(
if((nrectFill <= 0) || !pGC->planemask)
return;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
switch(pGC->fillStyle) {
@@ -944,8 +944,8 @@ XAAClipAndRenderRects(
pboxClippedBase = (BoxPtr)infoRec->PreAllocMem;
pboxClipped = pboxClippedBase;
- if (REGION_NUM_RECTS(pGC->pCompositeClip) == 1) {
- pextent = REGION_RECTS(pGC->pCompositeClip);
+ if (RegionNumRects(pGC->pCompositeClip) == 1) {
+ pextent = RegionRects(pGC->pCompositeClip);
while (nrectFill--) {
pboxClipped->x1 = max(pextent->x1, prect->x);
pboxClipped->y1 = max(pextent->y1, prect->y);
@@ -967,7 +967,7 @@ XAAClipAndRenderRects(
}
}
} else {
- pextent = REGION_EXTENTS(pGC->pScreen, pGC->pCompositeClip);
+ pextent = RegionExtents(pGC->pCompositeClip);
while (nrectFill--) {
int n;
BoxRec box, *pbox;
@@ -986,8 +986,8 @@ XAAClipAndRenderRects(
if ((box.x1 >= box.x2) || (box.y1 >= box.y2))
continue;
- n = REGION_NUM_RECTS (pGC->pCompositeClip);
- pbox = REGION_RECTS(pGC->pCompositeClip);
+ n = RegionNumRects (pGC->pCompositeClip);
+ pbox = RegionRects(pGC->pCompositeClip);
/* clip the rectangle to each box in the clip region
this is logically equivalent to calling Intersect()
@@ -1030,8 +1030,8 @@ XAAGetRectClipBoxes(
xRectangle *prect = prectInit;
RegionPtr prgnClip = pGC->pCompositeClip;
- if (REGION_NUM_RECTS(prgnClip) == 1) {
- pextent = REGION_RECTS(prgnClip);
+ if (RegionNumRects(prgnClip) == 1) {
+ pextent = RegionRects(prgnClip);
while (nrectFill--) {
pboxClipped->x1 = max(pextent->x1, prect->x);
pboxClipped->y1 = max(pextent->y1, prect->y);
@@ -1049,7 +1049,7 @@ XAAGetRectClipBoxes(
}
}
} else {
- pextent = REGION_EXTENTS(pGC->pScreen, prgnClip);
+ pextent = RegionExtents(prgnClip);
while (nrectFill--) {
int n;
BoxRec box, *pbox;
@@ -1068,8 +1068,8 @@ XAAGetRectClipBoxes(
if ((box.x1 >= box.x2) || (box.y1 >= box.y2))
continue;
- n = REGION_NUM_RECTS (prgnClip);
- pbox = REGION_RECTS(prgnClip);
+ n = RegionNumRects (prgnClip);
+ pbox = RegionRects(prgnClip);
/* clip the rectangle to each box in the clip region
this is logically equivalent to calling Intersect()
@@ -1090,6 +1090,6 @@ XAAGetRectClipBoxes(
}
}
- return(pboxClipped - pboxClippedBase);
+ return pboxClipped - pboxClippedBase;
}
diff --git a/xserver/hw/xfree86/xaa/xaaGC.c b/xserver/hw/xfree86/xaa/xaaGC.c
index e6083d529..fbef88d77 100644
--- a/xserver/hw/xfree86/xaa/xaaGC.c
+++ b/xserver/hw/xfree86/xaa/xaaGC.c
@@ -158,7 +158,7 @@ XAAValidateGC(
/* If our Ops are still the default ones we need to allocate new ones */
if(pGC->ops == &XAAFallbackOps) {
- if(!(pGCPriv->XAAOps = xalloc(sizeof(GCOps)))) {
+ if(!(pGCPriv->XAAOps = malloc(sizeof(GCOps)))) {
pGCPriv->XAAOps = &XAAFallbackOps;
return;
}
@@ -241,10 +241,9 @@ XAADestroyGC(GCPtr pGC)
XAA_GC_FUNC_PROLOGUE (pGC);
if(pGCPriv->XAAOps != &XAAFallbackOps)
- xfree(pGCPriv->XAAOps);
+ free(pGCPriv->XAAOps);
- if(pGCPriv->DashPattern)
- xfree(pGCPriv->DashPattern);
+ free(pGCPriv->DashPattern);
(*pGC->funcs->DestroyGC)(pGC);
XAA_GC_FUNC_EPILOGUE (pGC);
diff --git a/xserver/hw/xfree86/xaa/xaaImage.c b/xserver/hw/xfree86/xaa/xaaImage.c
index 4933beea3..e88f45c55 100644
--- a/xserver/hw/xfree86/xaa/xaaImage.c
+++ b/xserver/hw/xfree86/xaa/xaaImage.c
@@ -406,7 +406,7 @@ XAAPutImage(
Bool depthBug = FALSE;
if(!w || !h) return;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
depthBug = XAA_DEPTH_BUG(pGC);
@@ -431,7 +431,7 @@ XAAPutImage(
!(infoRec->WriteBitmapFlags & NO_PLANEMASK) &&
!(infoRec->WriteBitmapFlags & TRANSPARENCY_ONLY))){
- int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip);
+ int MaxBoxes = RegionNumRects(pGC->pCompositeClip);
BoxPtr pbox, pClipBoxes;
int nboxes, srcx, srcy, srcwidth;
xRectangle TheRect;
@@ -442,7 +442,7 @@ XAAPutImage(
TheRect.height = h;
if(MaxBoxes > (infoRec->PreAllocSize/sizeof(BoxRec))) {
- pClipBoxes = xalloc(MaxBoxes * sizeof(BoxRec));
+ pClipBoxes = malloc(MaxBoxes * sizeof(BoxRec));
if(!pClipBoxes) return;
} else pClipBoxes = (BoxPtr)infoRec->PreAllocMem;
@@ -514,7 +514,7 @@ XAAPutImage(
}
if(pClipBoxes != (BoxPtr)infoRec->PreAllocMem)
- xfree(pClipBoxes);
+ free(pClipBoxes);
} else
XAAFallbackOps.PutImage(pDraw, pGC, depth, x, y, w, h, leftPad,
format, pImage);
diff --git a/xserver/hw/xfree86/xaa/xaaInit.c b/xserver/hw/xfree86/xaa/xaaInit.c
index 2ce2d9085..11443a60e 100644
--- a/xserver/hw/xfree86/xaa/xaaInit.c
+++ b/xserver/hw/xfree86/xaa/xaaInit.c
@@ -42,12 +42,12 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
static void XAAEnableDisableFBAccess (int index, Bool enable);
static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
-static int XAAScreenKeyIndex;
-static DevPrivateKey XAAScreenKey = &XAAScreenKeyIndex;
-static int XAAGCKeyIndex;
-static DevPrivateKey XAAGCKey = &XAAGCKeyIndex;
-static int XAAPixmapKeyIndex;
-static DevPrivateKey XAAPixmapKey = &XAAPixmapKeyIndex;
+static DevPrivateKeyRec XAAScreenKeyRec;
+#define XAAScreenKey (&XAAScreenKeyRec)
+static DevPrivateKeyRec XAAGCKeyRec;
+#define XAAGCKey (&XAAGCKeyRec)
+static DevPrivateKeyRec XAAPixmapKeyRec;
+#define XAAPixmapKey (&XAAPixmapKeyRec)
DevPrivateKey XAAGetScreenKey(void) {
return XAAScreenKey;
@@ -69,7 +69,7 @@ XAACreateInfoRec(void)
{
XAAInfoRecPtr infoRec;
- infoRec = xcalloc(1, sizeof(XAAInfoRec));
+ infoRec = calloc(1, sizeof(XAAInfoRec));
if(infoRec)
infoRec->CachePixelGranularity = -1;
@@ -84,13 +84,11 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec)
if(infoRec->ClosePixmapCache)
(*infoRec->ClosePixmapCache)(infoRec->pScrn->pScreen);
- if(infoRec->PreAllocMem)
- xfree(infoRec->PreAllocMem);
+ free(infoRec->PreAllocMem);
- if(infoRec->PixmapCachePrivate)
- xfree(infoRec->PixmapCachePrivate);
+ free(infoRec->PixmapCachePrivate);
- xfree(infoRec);
+ free(infoRec);
}
@@ -100,21 +98,22 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
XAAScreenPtr pScreenPriv;
int i;
-#ifdef RENDER
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
-#endif
/* Return successfully if no acceleration wanted */
if (!infoRec)
return TRUE;
- if (!dixRequestPrivate(XAAGCKey, sizeof(XAAGCRec)))
+ if (!dixRegisterPrivateKey(&XAAGCKeyRec, PRIVATE_GC, sizeof(XAAGCRec)))
return FALSE;
- if (!dixRequestPrivate(XAAPixmapKey, sizeof(XAAPixmapRec)))
+ if (!dixRegisterPrivateKey(&XAAPixmapKeyRec, PRIVATE_PIXMAP, sizeof(XAAPixmapRec)))
return FALSE;
- if (!(pScreenPriv = xalloc(sizeof(XAAScreenRec))))
+ if (!dixRegisterPrivateKey(&XAAScreenKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if (!(pScreenPriv = malloc(sizeof(XAAScreenRec))))
return FALSE;
dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv);
@@ -173,7 +172,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
pScrn->EnableDisableFBAccess = XAAEnableDisableFBAccess;
pScreenPriv->WindowExposures = pScreen->WindowExposures;
-#ifdef RENDER
if (ps)
{
pScreenPriv->Composite = ps->Composite;
@@ -181,11 +179,10 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
pScreenPriv->Glyphs = ps->Glyphs;
ps->Glyphs = XAAGlyphs;
}
-#endif
if(pScrn->overlayFlags & OVERLAY_8_32_PLANAR)
XAASetupOverlay8_32Planar(pScreen);
- infoRec->PreAllocMem = xalloc(MAX_PREALLOC_MEM);
+ infoRec->PreAllocMem = malloc(MAX_PREALLOC_MEM);
if(infoRec->PreAllocMem)
infoRec->PreAllocSize = MAX_PREALLOC_MEM;
@@ -232,7 +229,7 @@ XAACloseScreen (int i, ScreenPtr pScreen)
/* We leave it up to the client to free the XAAInfoRec */
- xfree ((pointer) pScreenPriv);
+ free((pointer) pScreenPriv);
return (*pScreen->CloseScreen) (i, pScreen);
}
@@ -376,7 +373,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
goto BAILOUT;
}
- if(!(pLink = xalloc(sizeof(PixmapLink)))) {
+ if(!(pLink = malloc(sizeof(PixmapLink)))) {
xf86FreeOffscreenArea(area);
goto BAILOUT;
}
@@ -386,7 +383,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
if (!pPix) {
- xfree (pLink);
+ free(pLink);
xf86FreeOffscreenArea(area);
goto BAILOUT;
}
@@ -440,7 +437,7 @@ XAADestroyPixmap(PixmapPtr pPix)
if(pPix->refcnt == 1) {
if(pPriv->flags & OFFSCREEN) {
if(pPriv->flags & DGA_PIXMAP)
- xfree(pPriv->offscreenArea);
+ free(pPriv->offscreenArea);
else {
FBAreaPtr area = pPriv->offscreenArea;
PixmapLinkPtr pLink = infoRec->OffscreenPixmaps;
@@ -458,12 +455,12 @@ XAADestroyPixmap(PixmapPtr pPix)
xf86FreeOffscreenArea(area);
pPriv->offscreenArea = NULL;
- xfree(pLink);
+ free(pLink);
}
}
if(pPriv->freeData) { /* pixmaps that were once in video ram */
- xfree(pPix->devPrivate.ptr);
+ free(pPix->devPrivate.ptr);
pPix->devPrivate.ptr = NULL;
}
}
@@ -511,16 +508,23 @@ XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask)
static Bool
XAAEnterVT(int index, int flags)
{
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ Bool ret;
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
- return((*pScreenPriv->EnterVT)(index, flags));
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ ret = ((*pScreenPriv->EnterVT)(index, flags));
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = XAAEnterVT;
+ return ret;
}
static void
XAALeaveVT(int index, int flags)
{
+ ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
@@ -531,7 +535,10 @@ XAALeaveVT(int index, int flags)
infoRec->NeedToSync = FALSE;
}
+ pScrn->LeaveVT = pScreenPriv->LeaveVT;
(*pScreenPriv->LeaveVT)(index, flags);
+ pScreenPriv->LeaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = XAALeaveVT;
}
typedef struct {
@@ -555,7 +562,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet)
infoRec->UsingPixmapCache = state->UsingPixmapCache;
infoRec->CanDoColor8x8 = state->CanDoColor8x8;
infoRec->CanDoMono8x8 = state->CanDoMono8x8;
- xfree(infoRec->dgaSaves);
+ free(infoRec->dgaSaves);
infoRec->dgaSaves = NULL;
}
@@ -566,7 +573,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet)
XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE(devRet->pPix);
FBAreaPtr area;
- if((area = xalloc(sizeof(FBArea)))) {
+ if((area = malloc(sizeof(FBArea)))) {
area->pScreen = pScreen;
area->box.x1 = 0;
area->box.x2 = 0;
@@ -581,7 +588,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet)
pixPriv->offscreenArea = area;
if(!infoRec->dgaSaves) { /* save pixmap cache state */
- SavedCacheStatePtr state = xalloc(sizeof(SavedCacheState));
+ SavedCacheStatePtr state = malloc(sizeof(SavedCacheState));
state->UsingPixmapCache = infoRec->UsingPixmapCache;
state->CanDoColor8x8 = infoRec->CanDoColor8x8;
diff --git a/xserver/hw/xfree86/xaa/xaaInitAccel.c b/xserver/hw/xfree86/xaa/xaaInitAccel.c
index 157325e4b..2f40c81a2 100644
--- a/xserver/hw/xfree86/xaa/xaaInitAccel.c
+++ b/xserver/hw/xfree86/xaa/xaaInitAccel.c
@@ -1251,7 +1251,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
infoRec->ComputeDash = XAAComputeDash;
}
-#ifdef RENDER
{
Bool haveTexture = infoRec->CPUToScreenTextureFormats &&
infoRec->CPUToScreenTextureDstFormats &&
@@ -1271,7 +1270,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
infoRec->Glyphs = XAADoGlyphs;
}
}
-#endif
/************ Validation Functions **************/
@@ -1478,7 +1476,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
infoRec->CachePixelGranularity *= 2;
}
- xfree(options);
+ free(options);
if(!infoRec->CacheTile && infoRec->WritePixmapToCache)
infoRec->CacheTile = XAACacheTile;
diff --git a/xserver/hw/xfree86/xaa/xaaLine.c b/xserver/hw/xfree86/xaa/xaaLine.c
index 7469de179..d6c06eba8 100644
--- a/xserver/hw/xfree86/xaa/xaaLine.c
+++ b/xserver/hw/xfree86/xaa/xaaLine.c
@@ -35,8 +35,8 @@ XAAPolyLines(
#endif
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip);
- int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip);
+ BoxPtr pboxInit = RegionRects(pGC->pCompositeClip);
+ int nboxInit = RegionNumRects(pGC->pCompositeClip);
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
int xorg = pDrawable->x;
int yorg = pDrawable->y;
diff --git a/xserver/hw/xfree86/xaa/xaaLineMisc.c b/xserver/hw/xfree86/xaa/xaaLineMisc.c
index 6cef4bcd5..ed3cd486b 100644
--- a/xserver/hw/xfree86/xaa/xaaLineMisc.c
+++ b/xserver/hw/xfree86/xaa/xaaLineMisc.c
@@ -74,8 +74,7 @@ XAAComputeDash(GCPtr pGC)
int shift, value, direction;
Bool set;
- if(pGCPriv->DashPattern)
- xfree(pGCPriv->DashPattern);
+ free(pGCPriv->DashPattern);
pGCPriv->DashPattern = NULL;
pGCPriv->DashLength = 0;
@@ -93,7 +92,7 @@ XAAComputeDash(GCPtr pGC)
(PatternLength & (PatternLength - 1)))
return;
- pGCPriv->DashPattern = xcalloc((PatternLength + 31) >> 5, 4);
+ pGCPriv->DashPattern = calloc((PatternLength + 31) >> 5, 4);
if(!pGCPriv->DashPattern) return;
pGCPriv->DashLength = PatternLength;
diff --git a/xserver/hw/xfree86/xaa/xaaNonTEText.c b/xserver/hw/xfree86/xaa/xaaNonTEText.c
index d32c0bbc5..7bfddcbcd 100644
--- a/xserver/hw/xfree86/xaa/xaaNonTEText.c
+++ b/xserver/hw/xfree86/xaa/xaaNonTEText.c
@@ -82,7 +82,7 @@ XAAPolyText8NonTEColorExpansion(
infoRec->CharInfo);
}
- return (x + width);
+ return x + width;
}
@@ -112,7 +112,7 @@ XAAPolyText16NonTEColorExpansion(
infoRec->CharInfo);
}
- return (x + width);
+ return x + width;
}
@@ -128,7 +128,7 @@ XAAImageText8NonTEColorExpansion(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
unsigned long n;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
(*pGC->font->get_glyphs)(pGC->font, (unsigned long)count,
@@ -153,7 +153,7 @@ XAAImageText16NonTEColorExpansion(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
unsigned long n;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
(*pGC->font->get_glyphs)(
@@ -188,7 +188,7 @@ XAAImageGlyphBltNonTEColorExpansion(
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
ImageGlyphBltNonTEColorExpansion(
@@ -208,7 +208,7 @@ XAAPolyGlyphBltNonTEColorExpansion(
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
PolyGlyphBltNonTEColorExpansion(
@@ -291,7 +291,7 @@ PolyGlyphBltAsSingleBitmap (
pitch = (Right - Left + 31) >> 5;
size = (pitch << 2) * (Bottom - Top);
- block = xcalloc(1, size);
+ block = calloc(1, size);
topLine = 10000; botLine = -10000;
@@ -349,7 +349,7 @@ PolyGlyphBltAsSingleBitmap (
nbox--; pbox++;
}
- xfree(block);
+ free(block);
}
static void
@@ -368,8 +368,8 @@ ImageGlyphBltNonTEColorExpansion(
int skippix, skipglyph, width, n, i;
int Left, Right, Top, Bottom;
int LeftEdge, RightEdge, ytop, ybot;
- int nbox = REGION_NUM_RECTS(cclip);
- BoxPtr pbox = REGION_RECTS(cclip);
+ int nbox = RegionNumRects(cclip);
+ BoxPtr pbox = RegionRects(cclip);
Bool AlreadySetup = FALSE;
width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font);
@@ -405,8 +405,8 @@ ImageGlyphBltNonTEColorExpansion(
nbox--; pbox++;
}
- nbox = REGION_NUM_RECTS(cclip);
- pbox = REGION_RECTS(cclip);
+ nbox = RegionNumRects(cclip);
+ pbox = RegionRects(cclip);
if(infoRec->WriteBitmap && (nglyph > 1) &&
((FONTMAXBOUNDS(font, rightSideBearing) -
@@ -477,8 +477,8 @@ PolyGlyphBltNonTEColorExpansion(
int skippix, skipglyph, width, n, i;
int Left, Right, Top, Bottom;
int LeftEdge, RightEdge;
- int nbox = REGION_NUM_RECTS(cclip);
- BoxPtr pbox = REGION_RECTS(cclip);
+ int nbox = RegionNumRects(cclip);
+ BoxPtr pbox = RegionRects(cclip);
width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font);
diff --git a/xserver/hw/xfree86/xaa/xaaOffscreen.c b/xserver/hw/xfree86/xaa/xaaOffscreen.c
index 7c9d53270..cd0d9a900 100644
--- a/xserver/hw/xfree86/xaa/xaaOffscreen.c
+++ b/xserver/hw/xfree86/xaa/xaaOffscreen.c
@@ -79,7 +79,7 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen)
if(!tmpPix) {
pPriv->offscreenArea = area;
- xfree(data);
+ free(data);
pLink = pLink->next;
continue;
}
@@ -90,7 +90,7 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen)
(*pGC->ops->CopyArea)((DrawablePtr)tmpPix, (DrawablePtr)pPix, pGC,
0, 0, pPix->drawable.width, pPix->drawable.height, 0, 0);
- xfree(data);
+ free(data);
tmpPix->devPrivate.ptr = NULL;
FreeScratchGC(pGC);
@@ -132,13 +132,13 @@ XAAMoveOutOffscreenPixmap(PixmapPtr pPix)
bitsPerPixel = pPix->drawable.bitsPerPixel;
devKind = BitmapBytePad(width * bitsPerPixel);
- if(!(data = xalloc(devKind * height)))
+ if(!(data = malloc(devKind * height)))
FatalError("Out of memory\n");
tmpPix = GetScratchPixmapHeader(pScreen, width, height,
pPix->drawable.depth, bitsPerPixel, devKind, data);
if(!tmpPix) {
- xfree(data);
+ free(data);
FatalError("Out of memory\n");
}
diff --git a/xserver/hw/xfree86/xaa/xaaOverlay.c b/xserver/hw/xfree86/xaa/xaaOverlay.c
index 2956a3dbf..4b52bf6fd 100644
--- a/xserver/hw/xfree86/xaa/xaaOverlay.c
+++ b/xserver/hw/xfree86/xaa/xaaOverlay.c
@@ -54,23 +54,23 @@ XAACopyWindow8_32(
return;
}
- pwinRoot = WindowTable[pScreen->myNum];
+ pwinRoot = pScreen->root;
if(doUnderlay)
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
- REGION_NULL(pScreen, &rgnDst);
+ RegionNull(&rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionIntersect(&rgnDst, borderClip, prgnSrc);
- pbox = REGION_RECTS(&rgnDst);
- nbox = REGION_NUM_RECTS(&rgnDst);
+ pbox = RegionRects(&rgnDst);
+ nbox = RegionNumRects(&rgnDst);
if(!nbox ||
- !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
- REGION_UNINIT(pScreen, &rgnDst);
+ !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) {
+ RegionUninit(&rgnDst);
return;
}
ppt = pptSrc;
@@ -87,10 +87,10 @@ XAACopyWindow8_32(
XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- xfree(pptSrc);
- REGION_UNINIT(pScreen, &rgnDst);
+ free(pptSrc);
+ RegionUninit(&rgnDst);
if(freeReg)
- REGION_DESTROY(pScreen, borderClip);
+ RegionDestroy(borderClip);
}
static void
diff --git a/xserver/hw/xfree86/xaa/xaaOverlayDF.c b/xserver/hw/xfree86/xaa/xaaOverlayDF.c
index 8db816e1e..ca22368f4 100644
--- a/xserver/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/xserver/hw/xfree86/xaa/xaaOverlayDF.c
@@ -151,8 +151,8 @@ typedef struct {
int (*TiledFillChooser)(GCPtr);
} XAAOverlayRec, *XAAOverlayPtr;
-static int XAAOverlayKeyIndex;
-static DevPrivateKey XAAOverlayKey = &XAAOverlayKeyIndex;
+static DevPrivateKeyRec XAAOverlayKeyRec;
+#define XAAOverlayKey (&XAAOverlayKeyRec)
#define GET_OVERLAY_PRIV(pScreen) \
(XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey)
@@ -173,7 +173,10 @@ XAAInitDualFramebufferOverlay(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAAOverlayPtr pOverPriv;
- if(!(pOverPriv = xalloc(sizeof(XAAOverlayRec))))
+ if (!dixRegisterPrivateKey(&XAAOverlayKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
+ if(!(pOverPriv = malloc(sizeof(XAAOverlayRec))))
return FALSE;
dixSetPrivate(&pScreen->devPrivates, XAAOverlayKey, pOverPriv);
@@ -324,7 +327,7 @@ XAAOverCopyWindow(
RegionRec rgnDst;
BoxPtr pbox;
int i, nbox, dx, dy;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {
@@ -341,18 +344,18 @@ XAAOverCopyWindow(
infoRec->ScratchGC.alu = GXcopy;
infoRec->ScratchGC.planemask = ~0;
- REGION_NULL(pScreen, &rgnDst);
+ RegionNull(&rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
- nbox = REGION_NUM_RECTS(&rgnDst);
+ nbox = RegionNumRects(&rgnDst);
if(nbox &&
- (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) {
+ (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) {
- pbox = REGION_RECTS(&rgnDst);
+ pbox = RegionRects(&rgnDst);
for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) {
ppt->x = pbox->x1 + dx;
ppt->y = pbox->y1 + dy;
@@ -368,21 +371,21 @@ XAAOverCopyWindow(
&(infoRec->ScratchGC), &rgnDst, pptSrc);
}
- xfree(pptSrc);
+ free(pptSrc);
}
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if(pWin->drawable.depth == 8) {
- REGION_NULL(pScreen, &rgnDst);
+ RegionNull(&rgnDst);
miSegregateChildren(pWin, &rgnDst, pScrn->depth);
- if(REGION_NOTEMPTY(pScreen, &rgnDst)) {
- REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc);
- nbox = REGION_NUM_RECTS(&rgnDst);
+ if(RegionNotEmpty(&rgnDst)) {
+ RegionIntersect(&rgnDst, &rgnDst, prgnSrc);
+ nbox = RegionNumRects(&rgnDst);
if(nbox &&
- (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))){
+ (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))){
- pbox = REGION_RECTS(&rgnDst);
+ pbox = RegionRects(&rgnDst);
for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) {
ppt->x = pbox->x1 + dx;
ppt->y = pbox->y1 + dy;
@@ -391,10 +394,10 @@ XAAOverCopyWindow(
SWITCH_DEPTH(pScrn->depth);
XAADoBitBlt((DrawablePtr)pRoot, (DrawablePtr)pRoot,
&(infoRec->ScratchGC), &rgnDst, pptSrc);
- xfree(pptSrc);
+ free(pptSrc);
}
}
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
}
}
@@ -409,13 +412,13 @@ XAAOverWindowExposures(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
if((pWin->drawable.bitsPerPixel != 8) && infoRec->pScrn->vtSema) {
- if(REGION_NUM_RECTS(pReg) && infoRec->FillSolidRects) {
+ if(RegionNumRects(pReg) && infoRec->FillSolidRects) {
XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen);
SWITCH_DEPTH(8);
(*infoRec->FillSolidRects)(infoRec->pScrn,
infoRec->pScrn->colorKey, GXcopy, ~0,
- REGION_NUM_RECTS(pReg), REGION_RECTS(pReg));
+ RegionNumRects(pReg), RegionRects(pReg));
miWindowExposures(pWin, pReg, pOtherReg);
return;
} else if(infoRec->NeedToSync) {
diff --git a/xserver/hw/xfree86/xaa/xaaPCache.c b/xserver/hw/xfree86/xaa/xaaPCache.c
index 7e3011bd5..86ac1cd14 100644
--- a/xserver/hw/xfree86/xaa/xaaPCache.c
+++ b/xserver/hw/xfree86/xaa/xaaPCache.c
@@ -65,7 +65,7 @@ Enlist(CacheLinkPtr link, int x, int y, int w, int h)
{
CacheLinkPtr newLink;
- newLink = xalloc(sizeof(CacheLink));
+ newLink = malloc(sizeof(CacheLink));
newLink->next = link;
newLink->x = x; newLink->y = y;
newLink->w = w; newLink->h = h;
@@ -80,7 +80,7 @@ Delist(CacheLinkPtr link) {
if(link) {
ret = link->next;
- xfree(link);
+ free(link);
}
return ret;
}
@@ -94,7 +94,7 @@ FreeList(CacheLinkPtr link) {
while(link) {
tmp = link;
link = link->next;
- xfree(tmp);
+ free(tmp);
}
}
@@ -144,20 +144,14 @@ FreePixmapCachePrivate(XAAPixmapCachePrivatePtr pPriv)
{
if(!pPriv) return;
- if(pPriv->Info512)
- xfree(pPriv->Info512);
- if(pPriv->Info256)
- xfree(pPriv->Info256);
- if(pPriv->Info128)
- xfree(pPriv->Info128);
- if(pPriv->InfoColor)
- xfree(pPriv->InfoColor);
- if(pPriv->InfoMono)
- xfree(pPriv->InfoMono);
- if(pPriv->InfoPartial)
- xfree(pPriv->InfoPartial);
+ free(pPriv->Info512);
+ free(pPriv->Info256);
+ free(pPriv->Info128);
+ free(pPriv->InfoColor);
+ free(pPriv->InfoMono);
+ free(pPriv->InfoPartial);
- xfree(pPriv);
+ free(pPriv);
}
void
@@ -212,7 +206,7 @@ ThinOutPartials(
pCur->next = List8; List8 = pCur;
Num8++;
} else {
- xfree(pCur);
+ free(pCur);
}
pCur = next;
@@ -477,7 +471,7 @@ ConvertSomePartialsTo8x8(
}
}
}
- xfree(pCur);
+ free(pCur);
}
pCur = next;
@@ -639,8 +633,8 @@ XAAInitPixmapCache(
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
XAAInfoRecPtr infoRec = (XAAInfoRecPtr)data;
XAAPixmapCachePrivatePtr pCachePriv;
- BoxPtr pBox = REGION_RECTS(areas);
- int nBox = REGION_NUM_RECTS(areas);
+ BoxPtr pBox = RegionRects(areas);
+ int nBox = RegionNumRects(areas);
int Num512, Num256, Num128, NumPartial, NumColor, NumMono;
int Target512, Target256;
CacheLinkPtr List512, List256, List128, ListPartial, ListColor, ListMono;
@@ -955,7 +949,7 @@ XAAInitPixmapCache(
}
- pCachePriv = xcalloc(1,sizeof(XAAPixmapCachePrivate));
+ pCachePriv = calloc(1,sizeof(XAAPixmapCachePrivate));
if(!pCachePriv) {
if(Num512) FreeList(List512);
if(Num256) FreeList(List256);
@@ -969,21 +963,21 @@ XAAInitPixmapCache(
infoRec->PixmapCachePrivate = (char*)pCachePriv;
if(Num512) {
- pCachePriv->Info512 = xcalloc(Num512,sizeof(XAACacheInfoRec));
+ pCachePriv->Info512 = calloc(Num512,sizeof(XAACacheInfoRec));
if(!pCachePriv->Info512) Num512 = 0;
if(Num512) TransferList(List512, pCachePriv->Info512, Num512);
FreeList(List512);
pCachePriv->Num512x512 = Num512;
}
if(Num256) {
- pCachePriv->Info256 = xcalloc(Num256, sizeof(XAACacheInfoRec));
+ pCachePriv->Info256 = calloc(Num256, sizeof(XAACacheInfoRec));
if(!pCachePriv->Info256) Num256 = 0;
if(Num256) TransferList(List256, pCachePriv->Info256, Num256);
FreeList(List256);
pCachePriv->Num256x256 = Num256;
}
if(Num128) {
- pCachePriv->Info128 = xcalloc(Num128, sizeof(XAACacheInfoRec));
+ pCachePriv->Info128 = calloc(Num128, sizeof(XAACacheInfoRec));
if(!pCachePriv->Info128) Num128 = 0;
if(Num128) TransferList(List128, pCachePriv->Info128, Num128);
FreeList(List128);
@@ -991,7 +985,7 @@ XAAInitPixmapCache(
}
if(NumPartial) {
- pCachePriv->InfoPartial = xcalloc(NumPartial, sizeof(XAACacheInfoRec));
+ pCachePriv->InfoPartial = calloc(NumPartial, sizeof(XAACacheInfoRec));
if(!pCachePriv->InfoPartial) NumPartial = 0;
if(NumPartial)
TransferList(ListPartial, pCachePriv->InfoPartial, NumPartial);
@@ -1000,7 +994,7 @@ XAAInitPixmapCache(
}
if(NumColor) {
- pCachePriv->InfoColor = xcalloc(NumColor, sizeof(XAACacheInfoRec));
+ pCachePriv->InfoColor = calloc(NumColor, sizeof(XAACacheInfoRec));
if(!pCachePriv->InfoColor) NumColor = 0;
if(NumColor) TransferList(ListColor, pCachePriv->InfoColor, NumColor);
FreeList(ListColor);
@@ -1008,7 +1002,7 @@ XAAInitPixmapCache(
}
if(NumMono) {
- pCachePriv->InfoMono = xcalloc(NumMono, sizeof(XAACacheInfoRec));
+ pCachePriv->InfoMono = calloc(NumMono, sizeof(XAACacheInfoRec));
if(!pCachePriv->InfoMono) NumMono = 0;
if(NumMono) TransferList(ListMono, pCachePriv->InfoMono, NumMono);
FreeList(ListMono);
@@ -1557,7 +1551,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
pad = BitmapBytePad(pCache->w * bpp);
dwords = bytes_to_int32(pad);
- dstPtr = data = (unsigned char*)xalloc(pad * pCache->h);
+ dstPtr = data = (unsigned char*)malloc(pad * pCache->h);
srcPtr = (unsigned char*)pPix->devPrivate.ptr;
if(infoRec->ScreenToScreenColorExpandFillFlags & BIT_ORDER_IN_BYTE_MSBFIRST)
@@ -1588,7 +1582,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data,
pad, bpp, pScrn->depth);
- xfree(data);
+ free(data);
return pCache;
}
@@ -1867,7 +1861,7 @@ XAAWriteBitmapToCacheLinear(
){
ScreenPtr pScreen = pScrn->pScreen;
PixmapPtr pScreenPix, pDstPix;
- XID gcvals[2];
+ ChangeGCVal gcvals[2];
GCPtr pGC;
pScreenPix = (*pScreen->GetScreenPixmap)(pScreen);
@@ -1879,9 +1873,9 @@ XAAWriteBitmapToCacheLinear(
pScreenPix->devPrivate.ptr);
pGC = GetScratchGC(pScreenPix->drawable.depth, pScreen);
- gcvals[0] = fg;
- gcvals[1] = bg;
- DoChangeGC(pGC, GCForeground | GCBackground, gcvals, 0);
+ gcvals[0].val = fg;
+ gcvals[1].val = bg;
+ ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals);
ValidateGC((DrawablePtr)pDstPix, pGC);
/* We've unwrapped already so these ops miss a sync */
@@ -1970,7 +1964,7 @@ XAAWriteMono8x8PatternToCache(
pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel);
- data = (unsigned char*)xalloc(pad * pCache->h);
+ data = (unsigned char*)malloc(pad * pCache->h);
if(!data) return;
if(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_ORIGIN) {
@@ -1994,7 +1988,7 @@ XAAWriteMono8x8PatternToCache(
(*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth);
- xfree(data);
+ free(data);
}
void
@@ -2015,7 +2009,7 @@ XAAWriteColor8x8PatternToCache(
if(pixPriv->flags & REDUCIBLE_TO_2_COLOR) {
CARD32* ptr;
pad = BitmapBytePad(pCache->w);
- data = (unsigned char*)xalloc(pad * pCache->h);
+ data = (unsigned char*)malloc(pad * pCache->h);
if(!data) return;
if(infoRec->Color8x8PatternFillFlags &
@@ -2040,7 +2034,7 @@ XAAWriteColor8x8PatternToCache(
(*infoRec->WriteBitmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pCache->fg, pCache->bg);
- xfree(data);
+ free(data);
return;
}
@@ -2049,7 +2043,7 @@ XAAWriteColor8x8PatternToCache(
w = min(8,pPix->drawable.width);
pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel);
- data = (unsigned char*)xalloc(pad * pCache->h);
+ data = (unsigned char*)malloc(pad * pCache->h);
if(!data) return;
/* Write and expand horizontally. */
@@ -2088,7 +2082,7 @@ XAAWriteColor8x8PatternToCache(
(*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y,
pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth);
- xfree(data);
+ free(data);
}
diff --git a/xserver/hw/xfree86/xaa/xaaPict.c b/xserver/hw/xfree86/xaa/xaaPict.c
index e059d3d65..aaafacba5 100644
--- a/xserver/hw/xfree86/xaa/xaaPict.c
+++ b/xserver/hw/xfree86/xaa/xaaPict.c
@@ -215,7 +215,7 @@ XAADoComposite (
BoxPtr pbox;
int nbox, w, h;
- if(!REGION_NUM_RECTS(pDst->pCompositeClip))
+ if(!RegionNumRects(pDst->pCompositeClip))
return TRUE;
if(!infoRec->pScrn->vtSema || !DRAWABLE_IS_ON_CARD(pDst->pDrawable))
@@ -273,8 +273,8 @@ XAADoComposite (
width, height))
return TRUE;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox)
return TRUE;
@@ -298,7 +298,7 @@ XAADoComposite (
}
/* WriteBitmap sets the Sync flag */
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -340,11 +340,11 @@ XAADoComposite (
width, height))
return TRUE;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -355,7 +355,7 @@ XAADoComposite (
((PixmapPtr)(pMask->pDrawable))->devKind,
w, h, flags))
{
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return FALSE;
}
@@ -371,7 +371,7 @@ XAADoComposite (
}
SET_SYNC_FLAG(infoRec);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
} else {
@@ -409,11 +409,11 @@ XAADoComposite (
width, height))
return TRUE;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -423,7 +423,7 @@ XAADoComposite (
((PixmapPtr)(pSrc->pDrawable))->devKind,
w, h, flags))
{
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return FALSE;
}
@@ -440,7 +440,7 @@ XAADoComposite (
}
SET_SYNC_FLAG(infoRec);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}
@@ -476,16 +476,16 @@ XAACompositeSrcCopy (PicturePtr pSrc,
width, height))
return;
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
if(!nbox) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return;
}
- pptSrc = xalloc(sizeof(DDXPointRec) * nbox);
+ pptSrc = malloc(sizeof(DDXPointRec) * nbox);
if (!pptSrc) {
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return;
}
xoff = xSrc - xDst;
@@ -501,8 +501,8 @@ XAACompositeSrcCopy (PicturePtr pSrc,
XAADoBitBlt(pSrc->pDrawable, pDst->pDrawable, &infoRec->ScratchGC, &region,
pptSrc);
- xfree(pptSrc);
- REGION_UNINIT(pScreen, &region);
+ free(pptSrc);
+ RegionUninit(&region);
return;
}
@@ -588,7 +588,7 @@ XAADoGlyphs (CARD8 op,
ScreenPtr pScreen = pDst->pDrawable->pScreen;
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- if(!REGION_NUM_RECTS(pDst->pCompositeClip))
+ if(!RegionNumRects(pDst->pCompositeClip))
return TRUE;
if(!infoRec->pScrn->vtSema ||
diff --git a/xserver/hw/xfree86/xaa/xaaRect.c b/xserver/hw/xfree86/xaa/xaaRect.c
index 0a7e174b7..4a3912946 100644
--- a/xserver/hw/xfree86/xaa/xaaRect.c
+++ b/xserver/hw/xfree86/xaa/xaaRect.c
@@ -46,8 +46,8 @@ XAAPolyRectangleThinSolid(
int clipYMax; /* lower right corner of clip rect */
int width, height; /* width and height of rect */
- nClipRects = REGION_NUM_RECTS(pGC->pCompositeClip);
- pClipRects = REGION_RECTS(pGC->pCompositeClip);
+ nClipRects = RegionNumRects(pGC->pCompositeClip);
+ pClipRects = RegionRects(pGC->pCompositeClip);
if(!nClipRects) return;
diff --git a/xserver/hw/xfree86/xaa/xaaSpans.c b/xserver/hw/xfree86/xaa/xaaSpans.c
index 46d6d0740..a742cba1b 100644
--- a/xserver/hw/xfree86/xaa/xaaSpans.c
+++ b/xserver/hw/xfree86/xaa/xaaSpans.c
@@ -49,7 +49,7 @@ XAAFillSpans(
if((nInit <= 0) || !pGC->planemask)
return;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
switch(pGC->fillStyle) {
@@ -117,7 +117,7 @@ XAAFillSpans(
}
- if((nInit < 10) || (REGION_NUM_RECTS(pGC->pCompositeClip) != 1))
+ if((nInit < 10) || (RegionNumRects(pGC->pCompositeClip) != 1))
fastClip = FALSE;
if(fastClip) {
@@ -797,10 +797,10 @@ XAAClipAndRenderSpans(
pptNew = pptBase;
pwidthNew = pwidthBase;
- numRects = REGION_NUM_RECTS(pGC->pCompositeClip);
+ numRects = RegionNumRects(pGC->pCompositeClip);
if(numRects == 1) {
- BoxPtr pextent = REGION_RECTS(pGC->pCompositeClip);
+ BoxPtr pextent = RegionRects(pGC->pCompositeClip);
while(nspans--) {
if ((pextent->y1 <= ppt->y) && (ppt->y < pextent->y2)) {
@@ -830,7 +830,7 @@ XAAClipAndRenderSpans(
while(nspans--) {
nbox = numRects;
- pbox = REGION_RECTS(pGC->pCompositeClip);
+ pbox = RegionRects(pGC->pCompositeClip);
/* find the first band */
while(nbox && (pbox->y2 <= ppt->y)) {
diff --git a/xserver/hw/xfree86/xaa/xaaStateChange.c b/xserver/hw/xfree86/xaa/xaaStateChange.c
index 57d8aa318..189441d0d 100644
--- a/xserver/hw/xfree86/xaa/xaaStateChange.c
+++ b/xserver/hw/xfree86/xaa/xaaStateChange.c
@@ -260,7 +260,6 @@ typedef struct _XAAStateWrapRec {
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
CopyWindowProcPtr CopyWindow;
-#ifdef RENDER
Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op,
CARD16 red, CARD16 green,
CARD16 blue, CARD16 alpha,
@@ -271,11 +270,10 @@ typedef struct _XAAStateWrapRec {
CARD32 srcFormat, CARD32 dstFormat,
CARD8 *texPtr, int texPitch,
int width, int height, int flags);
-#endif
} XAAStateWrapRec, *XAAStateWrapPtr;
-static int XAAStateKeyIndex;
-static DevPrivateKey XAAStateKey = &XAAStateKeyIndex;
+static DevPrivateKeyRec XAAStateKeyRec;
+#define XAAStateKey (&XAAStateKeyRec)
/* Wrap functions start here */
#define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\
@@ -1457,7 +1455,6 @@ static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
prgnSrc);
}
-#ifdef RENDER
static Bool XAAStateWrapSetupForCPUToScreenAlphaTexture2(ScrnInfoPtr pScrn,
int op, CARD16 red,
CARD16 green,
@@ -1494,7 +1491,6 @@ static Bool XAAStateWrapSetupForCPUToScreenTexture2(ScrnInfoPtr pScrn, int op,
dstFormat, texPtr, texPitch,
width, height, flags);
}
-#endif
/* Setup Function */
Bool
@@ -1504,7 +1500,8 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
XAAStateWrapPtr pStatePriv;
int i = 0;
- if(!(pStatePriv = xalloc(sizeof(XAAStateWrapRec)))) return FALSE;
+ if (!dixRegisterPrivateKey(&XAAStateKeyRec, PRIVATE_SCREEN, 0)) return FALSE;
+ if(!(pStatePriv = malloc(sizeof(XAAStateWrapRec)))) return FALSE;
dixSetPrivate(&pScreen->devPrivates, XAAStateKey, pStatePriv);
pStatePriv->RestoreAccelState = infoRec->RestoreAccelState;
pStatePriv->pScrn = pScrn;
@@ -1624,9 +1621,7 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
XAA_STATE_WRAP(GetImage);
XAA_STATE_WRAP(GetSpans);
XAA_STATE_WRAP(CopyWindow);
-#ifdef RENDER
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2);
XAA_STATE_WRAP(SetupForCPUToScreenTexture2);
-#endif
return TRUE;
}
diff --git a/xserver/hw/xfree86/xaa/xaaTEGlyph.c b/xserver/hw/xfree86/xaa/xaaTEGlyph.c
index 41e638e5c..510c387b7 100644
--- a/xserver/hw/xfree86/xaa/xaaTEGlyph.c
+++ b/xserver/hw/xfree86/xaa/xaaTEGlyph.c
@@ -301,7 +301,7 @@ EXPNAME(XAATEGlyphRenderer3)(
}
dwords = ((3 * w + 31) >> 5) * h;
- mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char));
+ mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char));
if (!mem) return;
(*infoRec->SubsequentCPUToScreenColorExpandFill)(pScrn, x, y, w, h, 0);
@@ -321,7 +321,7 @@ EXPNAME(XAATEGlyphRenderer3)(
DrawTextScanline3(base, mem, w);
}
- xfree(mem);
+ free(mem);
if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) &&
(dwords & 1)) {
@@ -478,7 +478,7 @@ EXPNAME(XAATEGlyphRendererScanline3)(
w += skipleft;
x -= skipleft;
- mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char));
+ mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char));
if (!mem) return;
(*infoRec->SubsequentScanlineCPUToScreenColorExpandFill)(
@@ -495,7 +495,7 @@ EXPNAME(XAATEGlyphRendererScanline3)(
bufferNo = 0;
}
- xfree(mem);
+ free(mem);
THE_END:
diff --git a/xserver/hw/xfree86/xaa/xaaTEText.c b/xserver/hw/xfree86/xaa/xaaTEText.c
index fc445726f..41c0ebcfd 100644
--- a/xserver/hw/xfree86/xaa/xaaTEText.c
+++ b/xserver/hw/xfree86/xaa/xaaTEText.c
@@ -110,7 +110,7 @@ XAAImageText8TEColorExpansion(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
unsigned long n;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
(*pGC->font->get_glyphs)(pGC->font, (unsigned long)count,
@@ -134,7 +134,7 @@ XAAImageText16TEColorExpansion(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
unsigned long n;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
(*pGC->font->get_glyphs)(
@@ -169,7 +169,7 @@ XAAImageGlyphBltTEColorExpansion(
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
XAAGlyphBltTEColorExpansion(
@@ -189,7 +189,7 @@ XAAPolyGlyphBltTEColorExpansion(
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
XAAGlyphBltTEColorExpansion(
@@ -229,8 +229,8 @@ XAAGlyphBltTEColorExpansion(
int skippix, skipglyphs;
int Left, Right, Top, Bottom;
int LeftEdge, RightEdge, ytop, ybot;
- int nbox = REGION_NUM_RECTS(cclip);
- BoxPtr pbox = REGION_RECTS(cclip);
+ int nbox = RegionNumRects(cclip);
+ BoxPtr pbox = RegionRects(cclip);
unsigned int **glyphs = NULL;
int glyphWidth = FONTMAXBOUNDS(font, characterWidth);
@@ -273,7 +273,7 @@ XAAGlyphBltTEColorExpansion(
if (!fallbackBits) {
int fontHeight = Bottom - Top + 1;
- fallbackBits = xcalloc (glyphWidth * fontHeight, 1);
+ fallbackBits = calloc(glyphWidth * fontHeight, 1);
if (!fallbackBits)
return;
}
@@ -299,8 +299,7 @@ XAAGlyphBltTEColorExpansion(
skippix, ytop - Top, glyphs + skipglyphs, glyphWidth,
fg, bg, rop, planemask);
- if (fallbackBits)
- xfree (fallbackBits);
+ free(fallbackBits);
}
nbox--; pbox++;
diff --git a/xserver/hw/xfree86/xaa/xaaWideLine.c b/xserver/hw/xfree86/xaa/xaaWideLine.c
index 9479b0d7a..79a6159cd 100644
--- a/xserver/hw/xfree86/xaa/xaaWideLine.c
+++ b/xserver/hw/xfree86/xaa/xaaWideLine.c
@@ -32,10 +32,6 @@ Original mi code written by Keith Packard.
#include "xaa.h"
#include "xaalocal.h"
-#ifdef ICEILTEMPDECL
-ICEILTEMPDECL
-#endif
-
#define DRAW_POINT(pScrn, x, y) \
if(hardClip) (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, 1, 1); \
else XAAPointHelper(pScrn, x, y)
@@ -808,10 +804,10 @@ XAAPolylinesWideSolid (
int yorg = pDrawable->y;
Bool hardClip = FALSE;
- if(!REGION_NUM_RECTS(pGC->pCompositeClip))
+ if(!RegionNumRects(pGC->pCompositeClip))
return;
- if(REGION_NUM_RECTS(pGC->pCompositeClip) != 1) {
+ if(RegionNumRects(pGC->pCompositeClip) != 1) {
miWideLine(pDrawable, pGC, mode, npt, pPts);
return;
}
diff --git a/xserver/hw/xfree86/xaa/xaaWrapper.c b/xserver/hw/xfree86/xaa/xaaWrapper.c
index 88418946f..e91bac062 100644
--- a/xserver/hw/xfree86/xaa/xaaWrapper.c
+++ b/xserver/hw/xfree86/xaa/xaaWrapper.c
@@ -62,10 +62,8 @@ typedef struct {
UninstallColormapProcPtr UninstallColormap;
ListInstalledColormapsProcPtr ListInstalledColormaps;
StoreColorsProcPtr StoreColors;
-#ifdef RENDER
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
-#endif
CloseScreenProcPtr wrapCloseScreen;
CreateScreenResourcesProcPtr wrapCreateScreenResources;
@@ -79,10 +77,8 @@ typedef struct {
UninstallColormapProcPtr wrapUninstallColormap;
ListInstalledColormapsProcPtr wrapListInstalledColormaps;
StoreColorsProcPtr wrapStoreColors;
-#ifdef RENDER
CompositeProcPtr wrapComposite;
GlyphsProcPtr wrapGlyphs;
-#endif
int depth;
} xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr;
@@ -129,10 +125,10 @@ typedef struct _xaaWrapperGCPriv {
#define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC)
-static int xaaWrapperScrPrivateKeyIndex;
-static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKeyIndex;
-static int xaaWrapperGCPrivateKeyIndex;
-static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKeyIndex;
+static DevPrivateKeyRec xaaWrapperScrPrivateKeyRec;
+#define xaaWrapperScrPrivateKey (&xaaWrapperScrPrivateKeyRec)
+static DevPrivateKeyRec xaaWrapperGCPrivateKeyRec;
+#define xaaWrapperGCPrivateKey (&xaaWrapperGCPrivateKeyRec)
static Bool
xaaWrapperCreateScreenResources(ScreenPtr pScreen)
@@ -270,14 +266,15 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
{
Bool ret;
xaaWrapperScrPrivPtr pScrPriv;
-#ifdef RENDER
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
-#endif
- if (!dixRequestPrivate(xaaWrapperGCPrivateKey, sizeof(xaaWrapperGCPrivRec)))
+ if (!dixRegisterPrivateKey(&xaaWrapperGCPrivateKeyRec, PRIVATE_GC, sizeof(xaaWrapperGCPrivRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&xaaWrapperScrPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
- pScrPriv = (xaaWrapperScrPrivPtr) xalloc (sizeof (xaaWrapperScrPrivRec));
+ pScrPriv = (xaaWrapperScrPrivPtr) malloc(sizeof (xaaWrapperScrPrivRec));
if (!pScrPriv)
return FALSE;
@@ -293,12 +290,10 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
get (pScrPriv, pScreen, UninstallColormap, wrapUninstallColormap);
get (pScrPriv, pScreen, ListInstalledColormaps, wrapListInstalledColormaps);
get (pScrPriv, pScreen, StoreColors, wrapStoreColors);
-#ifdef RENDER
if (ps) {
get (pScrPriv, ps, Glyphs, wrapGlyphs);
get (pScrPriv, ps, Composite, wrapComposite);
}
-#endif
if (!(ret = XAAInit(pScreen,infoPtr)))
return FALSE;
@@ -317,12 +312,10 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
xaaWrapperListInstalledColormaps);
wrap (pScrPriv, pScreen, StoreColors, xaaWrapperStoreColors);
-#ifdef RENDER
if (ps) {
wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
wrap (pScrPriv, ps, Composite, xaaWrapperComposite);
}
-#endif
pScrPriv->depth = depth;
dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv);
@@ -438,7 +431,6 @@ xaaWrapperDestroyClip(GCPtr pGC)
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
}
-#ifdef RENDER
static void
xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
@@ -470,7 +462,6 @@ xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
}
-#endif
void
XAASync(ScreenPtr pScreen)
diff --git a/xserver/hw/xfree86/xaa/xaalocal.h b/xserver/hw/xfree86/xaa/xaalocal.h
index 5e3d373c6..a9a70da08 100644
--- a/xserver/hw/xfree86/xaa/xaalocal.h
+++ b/xserver/hw/xfree86/xaa/xaalocal.h
@@ -10,9 +10,7 @@
#include "xf86fbman.h"
#include "xaa.h"
#include "mi.h"
-#ifdef RENDER
#include "picturestr.h"
-#endif
#define GCWhenForced (GCArcMode << 1)
@@ -55,10 +53,8 @@ typedef struct _XAAScreen {
void (*LeaveVT)(int, int);
int (*SetDGAMode)(int, int, DGADevicePtr);
void (*EnableDisableFBAccess)(int, Bool);
-#ifdef RENDER
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
-#endif
} XAAScreenRec, *XAAScreenPtr;
#define OPS_ARE_PIXMAP 0x00000001
@@ -1539,7 +1535,6 @@ extern _X_EXPORT void XAARemoveAreaCallback(FBAreaPtr area);
extern _X_EXPORT void XAAMoveOutOffscreenPixmap(PixmapPtr pPix);
extern _X_EXPORT Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec);
-#ifdef RENDER
extern _X_EXPORT void
XAAComposite (CARD8 op,
PicturePtr pSrc,
@@ -1627,8 +1622,6 @@ XAAGetPixelFromRGBA (
CARD32 format
);
-#endif
-
/* XXX should be static */
extern _X_EXPORT GCOps XAAFallbackOps;
extern _X_EXPORT GCOps *XAAGetFallbackOps(void);
@@ -1716,7 +1709,7 @@ extern _X_EXPORT CARD32 XAAReverseBitOrder(CARD32 data);
if(_pLink->pPix == pPix) { \
if(_prev) _prev->next = _pLink->next; \
else infoRec->OffscreenPixmaps = _pLink->next; \
- xfree(_pLink); \
+ free(_pLink); \
break; \
} \
_prev = _pLink; \
diff --git a/xserver/hw/xfree86/xaa/xaawrap.h b/xserver/hw/xfree86/xaa/xaawrap.h
index 857dbc3ed..3f3c26171 100644
--- a/xserver/hw/xfree86/xaa/xaawrap.h
+++ b/xserver/hw/xfree86/xaa/xaawrap.h
@@ -32,7 +32,7 @@
#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
GCFuncs *oldFuncs = pGC->funcs;\
- if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \
+ if(!RegionNumRects(pGC->pCompositeClip)) return; \
pGC->funcs = pGCPriv->wrapFuncs;\
pGC->ops = pGCPriv->wrapOps
@@ -61,14 +61,12 @@
#include <xorg-config.h>
#endif
-#ifdef RENDER
#define XAA_RENDER_PROLOGUE(pScreen,field)\
(GetPictureScreen(pScreen)->field = \
((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
(GetPictureScreen(pScreen)->field = wrapper)
-#endif
/* This also works fine for drawables */