xfree86 merge

This commit is contained in:
Kaleb Keithley 2003-11-29 16:08:53 +00:00
parent 88193e928b
commit 77836ebda2
8 changed files with 1 additions and 381 deletions

View File

@ -1085,238 +1085,6 @@ cfbCopyPlane1to32
#if PSZ == 24
widthDst <<= 2;
#endif
#if PSZ == 32
pdstLine = (unsigned int *)pdstBase + dsty * widthDst + dstx;
#endif
xoffSrc = srcx & 0x1f;
/*
* compute constants for the first four bits to be
* copied. This avoids troubles with partial first
* writes, and difficult shift computation
*/
leftShift = xoffSrc;
rightShift = 32 - leftShift;
if (rop == GXcopy && (planemask & PMSK) == PMSK)
{
while (height--)
{
psrc = psrcLine;
pdst = pdstLine;
psrcLine += widthSrc;
pdstLine += widthDst;
bits = *psrc++;
nl = width;
while (nl >= 32)
{
tmp = BitLeft(bits, leftShift);
bits = *psrc++;
if (rightShift != 32)
tmp |= BitRight(bits, rightShift);
i = 0;
#if PSZ == 16
/*
* I've thrown in some optimization to at least write
* some aligned 32-bit words instead of 16-bit shorts.
*/
if ((unsigned long)psrc & 2) {
/* Write unaligned 16-bit word at left edge. */
if (tmp & 0x01)
*pdst = fgpixel;
else
*pdst = bgpixel;
pdst++;
i++;
}
while (i <= 24)
{
unsigned tmpbits = tmp >> i;
*(unsigned int *)pdst = doublet[tmpbits & 0x03];
*(unsigned int *)(pdst + 2) =
doublet[(tmpbits >> 2) & 0x03];
*(unsigned int *)(pdst + 4) =
doublet[(tmpbits >> 4) & 0x03];
*(unsigned int *)(pdst + 6) =
doublet[(tmpbits >> 6) & 0x03];
pdst += 8; /* Advance four 32-bit words. */
i += 8;
}
while (i <= 30)
{
*(unsigned int *)pdst =
doublet[(tmp >> i) & 0x03];
pdst += 2; /* Advance one 32-bit word. */
i += 2;
}
if (i == 31) {
if ((tmp >> 31) & 0x01)
*pdst = fgpixel;
else
*pdst = bgpixel;
pdst++;
}
#endif
#if PSZ == 24
while (i < 32) {
if ((tmp >> i) & 0x01) {
*pdst = fgpixel;
*(pdst + 1) = fgpixel >> 8;
*(pdst + 2) = fgpixel >> 16;
}
else {
*pdst = bgpixel;
*(pdst + 1) = bgpixel >> 8;
*(pdst + 2) = bgpixel >> 16;
}
pdst += 3;
i++;
}
#endif
#if PSZ == 32
while (i <= 28) {
int pair;
pair = (tmp >> i) & 0x03;
*pdst = doublet[pair * 2];
*(pdst + 1) = doublet[pair * 2 + 1];
pair = (tmp >> (i + 2)) & 0x03;
*(pdst + 2) = doublet[pair * 2];
*(pdst + 3) = doublet[pair * 2 + 1];
pdst += 4;
i += 4;
}
while (i < 32) {
*pdst = ((tmp >> i) & 0x01) ? fgpixel : bgpixel;
pdst++;
i++;
}
#endif
nl -= 32;
}
if (nl)
{
tmp = BitLeft(bits, leftShift);
/*
* better condition needed -- mustn't run
* off the end of the source...
*/
if (rightShift != 32)
{
bits = *psrc++;
tmp |= BitRight (bits, rightShift);
}
i = 32;
while (nl--)
{
--i;
#if PSZ == 24
if ((tmp >> (31 - i)) & 0x01) {
*pdst = fgpixel;
*(pdst + 1) = fgpixel >> 8;
*(pdst + 2) = fgpixel >> 16;
}
else {
*pdst = bgpixel;
*(pdst + 1) = bgpixel >> 8;
*(pdst + 2) = bgpixel >> 16;
}
pdst += 3;
#else
*pdst = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel;
pdst++;
#endif
}
}
}
}
else
{
while (height--)
{
psrc = psrcLine;
pdst = pdstLine;
psrcLine += widthSrc;
pdstLine += widthDst;
bits = *psrc++;
nl = width;
while (nl >= 32)
{
tmp = BitLeft(bits, leftShift);
bits = *psrc++;
if (rightShift != 32)
tmp |= BitRight(bits, rightShift);
i = 32;
while (i--)
{
src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel;
#if PSZ == 24
dst = *pdst;
dst |= (*(pdst + 1)) << 8;
dst |= (*(pdst + 2)) << 16;
DoRop (result, rop, src, dst);
*pdst = (dst & ~planemask) |
(result & planemask);
*(pdst+1) = ((dst & ~planemask) >> 8) |
((result & planemask) >> 8);
*(pdst+2) = ((dst & ~planemask) >> 16) |
((result & planemask) >> 16);
pdst += 3;
#else
DoRop (result, rop, src, *pdst);
*pdst = (*pdst & ~planemask) |
(result & planemask);
pdst++;
#endif
}
nl -= 32;
}
if (nl)
{
tmp = BitLeft(bits, leftShift);
/*
* better condition needed -- mustn't run
* off the end of the source...
*/
if (rightShift != 32)
{
bits = *psrc++;
tmp |= BitRight (bits, rightShift);
}
i = 32;
while (nl--)
{
--i;
src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel;
#if PSZ == 24
dst = *pdst;
dst |= (*(pdst + 1)) << 8;
dst |= (*(pdst + 2)) << 16;
DoRop (result, rop, src, dst);
*pdst = (dst & ~planemask) |
(result & planemask);
*(pdst+1) = ((dst & ~planemask) >> 8) |
((result & planemask) >> 8);
*(pdst+2) = ((dst & ~planemask) >> 16) |
((result & planemask) >> 16);
pdst += 3;
#else
DoRop (result, rop, src, *pdst);
*pdst = (*pdst & ~planemask) |
(result & planemask);
pdst++;
#endif
}
}
}
}
}
}
#endif /* PSZ == 8 */
nbox = REGION_NUM_RECTS(prgnDst);
pbox = REGION_RECTS(prgnDst);

View File

@ -91,12 +91,6 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas
#else
int dstBit; /* offset in bits from beginning of
* word */
int offSrc;
int nl;
#if PSZ == 24
register char *psrcb, *pdstb;
register int xIndex;
#else
register int nstart; /* number of bits from first partial */
#if PSZ != 32 || PPW != 1
register int nend; /* " " last partial word */

View File

@ -480,8 +480,6 @@ main(int argc, char *argv[], char *envp[])
if (dispatchException & DE_TERMINATE)
{
CloseWellKnownConnections();
OsCleanup();
ddxGiveUp();
break;
}

View File

@ -284,9 +284,6 @@ extern volatile ScreenPtr currentRegionScreen;
#define REGION_BROKEN(_pScreen, _pReg) \
(REGION_SCREEN(_pScreen), REGION_NAR(_pReg))
#define REGION_BROKEN(_pScreen, _pReg) \
REGION_NAR(_pReg)
#define REGION_EMPTY(_pScreen, _pReg) \
{ \
REGION_UNINIT(_pScreen, _pReg); \

View File

@ -142,23 +142,6 @@ typedef Bool (*FindComplexResType)(
XID /*id*/,
pointer /*cdata*/);
typedef void (*FindAllRes)(
#if NeedNestedPrototypes
pointer /*value*/,
XID /*id*/,
RESTYPE /*type*/,
pointer /*cdata*/
#endif
);
typedef Bool (*FindComplexResType)(
#if NeedNestedPrototypes
pointer /*value*/,
XID /*id*/,
pointer /*cdata*/
#endif
);
extern RESTYPE CreateNewResourceType(
DeleteType /*deleteFunc*/);

View File

@ -158,13 +158,6 @@ typedef void (* RestackWindowProcPtr)(
WindowPtr /*pWindow*/,
WindowPtr /*pOldNextSib*/);
typedef void (* RestackWindowProcPtr)(
#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
WindowPtr /*pOldNextSib*/
#endif
);
typedef int (* ValidateTreeProcPtr)(
WindowPtr /*pParent*/,
WindowPtr /*pChild*/,
@ -493,31 +486,6 @@ typedef PixmapPtr (* GetScreenPixmapProcPtr)(
typedef void (* SetScreenPixmapProcPtr)(
PixmapPtr /*pPix*/);
typedef PixmapPtr (* GetWindowPixmapProcPtr)(
#if NeedNestedPrototypes
WindowPtr /*pWin*/
#endif
);
typedef void (* SetWindowPixmapProcPtr)(
#if NeedNestedPrototypes
WindowPtr /*pWin*/,
PixmapPtr /*pPix*/
#endif
);
typedef PixmapPtr (* GetScreenPixmapProcPtr)(
#if NeedNestedPrototypes
ScreenPtr /*pScreen*/
#endif
);
typedef void (* SetScreenPixmapProcPtr)(
#if NeedNestedPrototypes
PixmapPtr /*pPix*/
#endif
);
typedef void (* MarkWindowProcPtr)(
WindowPtr /*pWin*/);

View File

@ -136,10 +136,6 @@ Bool PanoramiXWindowExposureSent = FALSE;
Bool PanoramiXOneExposeRequest = FALSE;
#endif
#ifdef DDXOSVERRORF
void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL;
#endif
int auditTrailLevel = 1;
Bool Must_have_memory = FALSE;
@ -1262,24 +1258,6 @@ XNFcalloc(unsigned long amount)
return ret;
}
/*****************
* XNFcalloc
*****************/
void *
XNFcalloc (amount)
unsigned long amount;
{
unsigned long *ret;
ret = Xalloc (amount);
if (ret)
bzero ((char *) ret, (int) amount);
else if ((long)amount > 0)
FatalError("Out of memory");
return ret;
}
/*****************
* Xrealloc
*****************/
@ -1812,9 +1790,6 @@ Fclose(pointer iop)
#ifndef REMOVE_ENV_LD
#define REMOVE_ENV_LD 1
#endif
AbortServer();
/*NOTREACHED*/
}
/* Remove long environment variables? */
#ifndef REMOVE_LONG_ENV

View File

@ -920,72 +920,9 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0;
filter->keycode= 0;
filter->active= 0;
}
return 1;
return 0;
}
static int
#if NeedFunctionPrototypes
_XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
#else
_XkbFilterSwitchScreen(xkbi,filter,keycode,pAction)
XkbSrvInfoPtr xkbi;
XkbFilterPtr filter;
unsigned keycode;
XkbAction * pAction;
#endif
{
if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = 0;
filter->filter = _XkbFilterSwitchScreen;
AccessXCancelRepeatKey(xkbi, keycode);
XkbDDXSwitchScreen(dev,keycode,pAction);
return 0;
}
else if (filter->keycode==keycode) {
filter->active= 0;
return 0;
}
return 1;
}
#ifdef XFree86Server
static int
#if NeedFunctionPrototypes
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
#else
_XkbFilterXF86Private(xkbi,filter,keycode,pAction)
XkbSrvInfoPtr xkbi;
XkbFilterPtr filter;
unsigned keycode;
XkbAction * pAction;
#endif
{
if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = 0;
filter->filter = _XkbFilterXF86Private;
XkbDDXPrivate(dev,keycode,pAction);
return 0;
}
else if (filter->keycode==keycode) {
filter->active= 0;
return 0;
}
return 1;
}
#endif
static int
_XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,