mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-09 14:40:15 +01:00
Import changes from XORG-6.8.2
This commit is contained in:
parent
9283205090
commit
ee02a83013
59 changed files with 1674 additions and 1066 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/Xext/saver.c,v 1.2 2004/04/23 18:44:41 eich Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/*
|
||||
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
|
||||
*
|
||||
|
|
@ -210,7 +210,7 @@ static int ScreenPrivateIndex;
|
|||
|
||||
#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr)
|
||||
#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v);
|
||||
#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s)
|
||||
#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL)
|
||||
|
||||
#define New(t) ((t *) xalloc (sizeof (t)))
|
||||
|
||||
|
|
@ -1185,6 +1185,7 @@ ScreenSaverUnsetAttributes (ClientPtr client)
|
|||
pPriv = GetScreenPrivate (pDraw->pScreen);
|
||||
if (pPriv && pPriv->attr && pPriv->attr->client == client)
|
||||
{
|
||||
FreeResource (pPriv->attr->resource, AttrType);
|
||||
FreeScreenAttr (pPriv->attr);
|
||||
pPriv->attr = NULL;
|
||||
CheckScreenPrivate (pDraw->pScreen);
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ static
|
|||
PixmapFormatRec PSPixmapFormats[] = {
|
||||
{ 1, 1, BITMAP_SCANLINE_PAD },
|
||||
{ 8, 8, BITMAP_SCANLINE_PAD },
|
||||
{ 12, 16, BITMAP_SCANLINE_PAD },
|
||||
{ 24, 32, BITMAP_SCANLINE_PAD }
|
||||
};
|
||||
|
||||
|
|
@ -1217,9 +1218,9 @@ AugmentFontPath(void)
|
|||
* calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine
|
||||
* the context associated with the client, and then queries the context's
|
||||
* attributes to determine whether the bitmap fonts should be visible.
|
||||
* It looks at the value of the xp-listfonts-mode document/page attribute to
|
||||
* It looks at the value of the xp-listfonts-modes document/page attribute to
|
||||
* see if xp-list-glyph-fonts has been left out of the mode list. Only
|
||||
* if the xp-listfonts-mode attribute exists, and it does not contain
|
||||
* if the xp-listfonts-modes attribute exists, and it does not contain
|
||||
* xp-list-glyph-fonts does this function return FALSE. In any other
|
||||
* case the funtion returns TRUE, indicating that the bitmap fonts
|
||||
* should be visible to the client.
|
||||
|
|
@ -1238,10 +1239,10 @@ XpClientIsBitmapClient(
|
|||
* Check the page attributes, and if it's not defined there, then
|
||||
* check the document attributes.
|
||||
*/
|
||||
mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-mode");
|
||||
mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
|
||||
if(!mode || !strlen(mode))
|
||||
{
|
||||
mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-mode");
|
||||
mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
|
||||
if(!mode || !strlen(mode))
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1251,14 +1252,21 @@ XpClientIsBitmapClient(
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* XpClientIsPrintClient is called by the font code to find out if
|
||||
* a particular client has set a context which references a printer
|
||||
* which utilizes a particular font path. This function works by
|
||||
* calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine
|
||||
* the context associated with the client, and then looks up the
|
||||
* font directory for the context. The font directory is then compared
|
||||
* with the directory specified in the FontPathElement which is passed in.
|
||||
* which utilizes a particular font path.
|
||||
* This function works by calling XpContextOfClient
|
||||
* (in Xserver/Xext/xprint.c) to determine the context associated with
|
||||
* the client and then looks at the value of the xp-listfonts-modes
|
||||
* document/page attribute to see if xp-list-internal-printer-fonts has
|
||||
* been left out of the mode list.
|
||||
* If the xp-listfonts-modes attribute exists, and it does not contain
|
||||
* xp-list-internal-printer-fonts this function returns FALSE.
|
||||
* Otherwise it looks up the font directory for the context. The font
|
||||
* directory is then compared with the directory specified in the
|
||||
* FontPathElement which is passed in.
|
||||
*/
|
||||
Bool
|
||||
XpClientIsPrintClient(
|
||||
|
|
@ -1266,11 +1274,28 @@ XpClientIsPrintClient(
|
|||
FontPathElementPtr fpe)
|
||||
{
|
||||
XpContextPtr pContext;
|
||||
char *mode;
|
||||
char *modelID, *fontDir;
|
||||
|
||||
if(!(pContext = XpContextOfClient(client)))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Check the page attributes, and if it's not defined there, then
|
||||
* check the document attributes.
|
||||
*/
|
||||
mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
|
||||
if(!mode || !strlen(mode))
|
||||
{
|
||||
mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
|
||||
}
|
||||
|
||||
if(mode && strlen(mode))
|
||||
{
|
||||
if(!strstr(mode, "xp-list-internal-printer-fonts"))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!fpe)
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
18
Xprint/Oid.c
18
Xprint/Oid.c
|
|
@ -2104,16 +2104,16 @@ const char* XpOidNotifyString(XpOidNotify notify)
|
|||
{
|
||||
switch(notify)
|
||||
{
|
||||
case XPOID_NOTIFY_UNSUPPORTED:
|
||||
return (const char*)NULL;
|
||||
break;
|
||||
case XPOID_NOTIFY_NONE:
|
||||
return NOTIFY_NONE_STR;
|
||||
break;
|
||||
case XPOID_NOTIFY_EMAIL:
|
||||
return NOTIFY_EMAIL_STR;
|
||||
break;
|
||||
case XPOID_NOTIFY_NONE:
|
||||
return NOTIFY_NONE_STR;
|
||||
case XPOID_NOTIFY_EMAIL:
|
||||
return NOTIFY_EMAIL_STR;
|
||||
case XPOID_NOTIFY_UNSUPPORTED:
|
||||
return (const char *)NULL;
|
||||
}
|
||||
|
||||
ErrorF("XpOidNotifyString: Unsupported notify=%ld\n", (long)notify);
|
||||
return (const char *)NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -141,30 +141,6 @@ ReplaceFileString(
|
|||
return string;
|
||||
}
|
||||
|
||||
/*
|
||||
* ExecCommand takes two character pointers - the command to execute,
|
||||
* and the "argv" style NULL-terminated vector of arguments for the command.
|
||||
* We wait for the command to terminate before continuing to ensure that
|
||||
* we don't delete the job file before the spooler has made a copy.
|
||||
*/
|
||||
void
|
||||
ExecCommand(
|
||||
char *pCommand,
|
||||
char **argVector)
|
||||
{
|
||||
pid_t childPid;
|
||||
int status;
|
||||
|
||||
if((childPid = fork()) == 0)
|
||||
{
|
||||
execv(pCommand, argVector);
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) waitpid(childPid, &status, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* TransferBytes reads numBytes of data from pSrcFile and writes them
|
||||
|
|
|
|||
|
|
@ -816,7 +816,7 @@ AppendEntry(
|
|||
char *s, c;
|
||||
|
||||
if (*type != XrmQString)
|
||||
return;
|
||||
return False;
|
||||
|
||||
for (firstNameSeen = False; *quarks; bindings++, quarks++) {
|
||||
if (*bindings == XrmBindLoosely) {
|
||||
|
|
@ -1083,34 +1083,6 @@ XpSpoolerGetServerAttributes(void)
|
|||
return db;
|
||||
}
|
||||
|
||||
/*
|
||||
* ExecuteCommand takes two pointers - the command to execute,
|
||||
* and the "argv" style NULL-terminated vector of arguments for the command.
|
||||
* We wait for the command to terminate before continuing to ensure that
|
||||
* we don't delete the job file before the spooler has made a copy.
|
||||
*/
|
||||
static void
|
||||
ExecCommand(pCommand, argVector)
|
||||
char *pCommand;
|
||||
char **argVector;
|
||||
{
|
||||
pid_t childPid;
|
||||
int status;
|
||||
|
||||
if((childPid = fork()) == 0)
|
||||
{
|
||||
/* return BadAlloc? */
|
||||
if (execv(pCommand, argVector) == -1) {
|
||||
FatalError("unable to exec '%s'", pCommand);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) waitpid(childPid, &status, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* SendFileToCommand takes three character pointers - the file name,
|
||||
* the command to execute,
|
||||
|
|
@ -1515,6 +1487,8 @@ XpSubmitJob(fileName, pContext)
|
|||
|
||||
FreeVector(vector);
|
||||
xfree(cmdNam);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -109,8 +109,6 @@ char *ReplaceAnyString(char *string,
|
|||
char *ReplaceFileString(char *string,
|
||||
char *inFileName,
|
||||
char *outFileName);
|
||||
void ExecCommand(char *pCommand,
|
||||
char **argVector);
|
||||
int TransferBytes(FILE *pSrcFile,
|
||||
FILE *pDstFile,
|
||||
int numBytes);
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ get_fontlist_from_xfs_config()
|
|||
tok="${val#*=}"
|
||||
done
|
||||
done
|
||||
) | tr "," "[\n]" | fontpath2fontlist
|
||||
) | tr "," "\n" | fontpath2fontlist
|
||||
}
|
||||
|
||||
get_fontlist_from_all_xfs_configs()
|
||||
|
|
@ -832,7 +832,7 @@ do_get_xpserverlist()
|
|||
echo ${display}
|
||||
fi
|
||||
)
|
||||
done | tr "[\n]" " "
|
||||
done | tr "\n" " "
|
||||
)
|
||||
# Only produce output if we have some entries...
|
||||
[ "${xpserverlist}" != "" ] && echo "${xpserverlist}"
|
||||
|
|
|
|||
|
|
@ -329,12 +329,12 @@ AllocatePclPrivates(ScreenPtr pScreen)
|
|||
*/
|
||||
|
||||
static char DOC_ATT_SUPP[]="document-attributes-supported";
|
||||
static char DOC_ATT_VAL[]="document-format";
|
||||
static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
|
||||
static char JOB_ATT_SUPP[]="job-attributes-supported";
|
||||
static char JOB_ATT_VAL[]="";
|
||||
static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
|
||||
static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
|
||||
default-input-tray default-medium plex";
|
||||
default-input-tray default-medium plex xp-listfonts-modes";
|
||||
|
||||
static int
|
||||
PclInitContext(XpContextPtr pCon)
|
||||
|
|
@ -427,7 +427,7 @@ PclInitContext(XpContextPtr pCon)
|
|||
server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
|
||||
if( ( attrStr = (char *)xalloc(strlen(server) + strlen(DOC_ATT_SUPP)
|
||||
+ strlen(DOC_ATT_VAL) +
|
||||
strlen(PAGE_ATT_VAL) + 6 ) )
|
||||
strlen(PAGE_ATT_VAL) + 8 ) )
|
||||
== (char *)NULL )
|
||||
return BadAlloc;
|
||||
sprintf( attrStr, "*%s:\t%s %s %s", DOC_ATT_SUPP, server,
|
||||
|
|
@ -440,7 +440,7 @@ PclInitContext(XpContextPtr pCon)
|
|||
*/
|
||||
server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
|
||||
if( ( attrStr = (char *)xalloc(strlen(server) + strlen(JOB_ATT_SUPP)
|
||||
+ strlen(JOB_ATT_VAL) + 4 ) )
|
||||
+ strlen(JOB_ATT_VAL) + 8 ) )
|
||||
== (char *)NULL )
|
||||
return BadAlloc;
|
||||
sprintf( attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL );
|
||||
|
|
@ -452,7 +452,7 @@ PclInitContext(XpContextPtr pCon)
|
|||
*/
|
||||
server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
|
||||
if( ( attrStr = (char *)xalloc(strlen(server) + strlen(PAGE_ATT_SUPP)
|
||||
+ strlen(PAGE_ATT_VAL) + 4 ) )
|
||||
+ strlen(PAGE_ATT_VAL) + 8 ) )
|
||||
== (char *)NULL )
|
||||
return BadAlloc;
|
||||
sprintf( attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL );
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ typedef struct
|
|||
|
||||
extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc,
|
||||
char **argv);
|
||||
static Bool PsDestroyContext(XpContextPtr pCon);
|
||||
extern XpContextPtr PsGetContextFromWindow(WindowPtr win);
|
||||
|
||||
/*
|
||||
|
|
@ -374,9 +373,6 @@ extern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client,
|
|||
*/
|
||||
|
||||
extern Bool PsCreateGC(GCPtr pGC);
|
||||
static int PsGetDrawablePrivateStuff(DrawablePtr pDrawable, GC *gc,
|
||||
unsigned long *valid, PsOutPtr *psOut,
|
||||
ColormapPtr *cMap);
|
||||
extern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable );
|
||||
extern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable,
|
||||
PsOutPtr *psOut, ColormapPtr *cMap);
|
||||
|
|
@ -556,7 +552,7 @@ extern int PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList);
|
|||
extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs);
|
||||
extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen,
|
||||
unsigned short *pBlue, VisualPtr pVisual);
|
||||
extern int PsGetPixelColor(ColormapPtr cMap, int pixval);
|
||||
extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval);
|
||||
extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
|
||||
ColormapPtr cMap);
|
||||
|
||||
|
|
@ -566,6 +562,7 @@ extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
|
|||
|
||||
extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
|
||||
int depth);
|
||||
extern void PsScrubPixmap(PixmapPtr pPixmap);
|
||||
extern Bool PsDestroyPixmap(PixmapPtr pPixmap);
|
||||
extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
|
||||
extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,13 @@ PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
|
||||
pt = (char *)(&i); i = 1; if( pt[0]=='\001' ) swap = 1; else swap = 0;
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
if( depth==30 )
|
||||
{
|
||||
ErrorF("PsPutScaledImage: Not implemented yet for 30bit\m");
|
||||
}
|
||||
else
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
if( depth==24 )
|
||||
{
|
||||
PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3);
|
||||
|
|
@ -174,6 +181,34 @@ PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
else goto error;
|
||||
PsOut_EndImage(psOut);
|
||||
}
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
else if( (depth > 8) && (depth < 16) )
|
||||
{
|
||||
int rowsiz = PixmapBytePad(w, depth);
|
||||
PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3);
|
||||
for( r=0 ; r<h ; r++ )
|
||||
{
|
||||
short *pt = (short *)&pImage[rowsiz*r];
|
||||
for( c=0 ; c<w ; c++,pt++ )
|
||||
{
|
||||
PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFFFF);
|
||||
/* XXX: This needs to be fixed for endian swapping and to support
|
||||
* depths deeper than 8bit per R-,G-,B-gun... */
|
||||
int val = PSOUTCOLOR_TO_RGB24BIT(clr);
|
||||
char *ipt = (char *)&val;
|
||||
if( swap )
|
||||
{
|
||||
char tmp[4];
|
||||
tmp[0] = ipt[3]; tmp[1] = ipt[2]; tmp[2] = ipt[1]; tmp[3] = ipt[0];
|
||||
PsOut_OutImageBytes(psOut, 3, &tmp[1]);
|
||||
}
|
||||
else
|
||||
PsOut_OutImageBytes(psOut, 3, &ipt[1]);
|
||||
}
|
||||
}
|
||||
PsOut_EndImage(psOut);
|
||||
}
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
else if( depth==8 )
|
||||
{
|
||||
int rowsiz = PixmapBytePad(w, depth);
|
||||
|
|
@ -183,8 +218,9 @@ PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
char *pt = &pImage[rowsiz*r];
|
||||
for( c=0 ; c<w ; c++,pt++ )
|
||||
{
|
||||
int val = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
|
||||
char *ipt = (char *)&val;
|
||||
PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
|
||||
int val = PSOUTCOLOR_TO_RGB24BIT(clr);
|
||||
char *ipt = (char *)&val;
|
||||
if( swap )
|
||||
{
|
||||
char tmp[4];
|
||||
|
|
@ -296,6 +332,14 @@ PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
|
||||
PsOut_BeginImageCache(psOut, cache_id);
|
||||
#endif
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
if( depth==30 )
|
||||
{
|
||||
ErrorF("PsPutScaledImageIM: Not implemented yet for 30bit\m");
|
||||
}
|
||||
else
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
if( depth==24 )
|
||||
{
|
||||
PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3);
|
||||
|
|
@ -339,6 +383,32 @@ PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
else goto error;
|
||||
PsOut_EndImage(psOut);
|
||||
}
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
else if( (depth > 8) && (depth < 16) )
|
||||
{
|
||||
int rowsiz = PixmapBytePad(w, depth);
|
||||
PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3);
|
||||
for( r=0 ; r<h ; r++ )
|
||||
{
|
||||
short *pt = (short *)&pImage[rowsiz*r];
|
||||
for( c=0 ; c<w ; c++,pt++ )
|
||||
{
|
||||
PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFFFF);
|
||||
int val = PSOUTCOLOR_TO_RGB24BIT(clr);
|
||||
char *ipt = (char *)&val;
|
||||
if( swap )
|
||||
{
|
||||
char tmp[4];
|
||||
tmp[0] = ipt[3]; tmp[1] = ipt[2]; tmp[2] = ipt[1]; tmp[3] = ipt[0];
|
||||
PsOut_OutImageBytes(psOut, 3, &tmp[1]);
|
||||
}
|
||||
else
|
||||
PsOut_OutImageBytes(psOut, 3, &ipt[1]);
|
||||
}
|
||||
}
|
||||
PsOut_EndImage(psOut);
|
||||
}
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
else if( depth==8 )
|
||||
{
|
||||
int rowsiz = PixmapBytePad(w, depth);
|
||||
|
|
@ -348,8 +418,11 @@ PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||
char *pt = &pImage[rowsiz*r];
|
||||
for( c=0 ; c<w ; c++,pt++ )
|
||||
{
|
||||
int val = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
|
||||
char *ipt = (char *)&val;
|
||||
PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
|
||||
/* XXX: This needs to be fixed for endian swapping and to support
|
||||
* depths deeper than 8bit per R-,G-,B-gun... */
|
||||
int val = PSOUTCOLOR_TO_RGB24BIT(clr);
|
||||
char *ipt = (char *)&val;
|
||||
if( swap )
|
||||
{
|
||||
char tmp[4];
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ in this Software without prior written authorization from The Open Group.
|
|||
********************************************************************/
|
||||
|
||||
#include "Ps.h"
|
||||
#include "mi.h"
|
||||
#include "micmap.h"
|
||||
#include "gcstruct.h"
|
||||
#include "windowstr.h"
|
||||
#include "colormapst.h"
|
||||
|
|
@ -82,49 +84,25 @@ in this Software without prior written authorization from The Open Group.
|
|||
Bool
|
||||
PsCreateColormap(ColormapPtr pColor)
|
||||
{
|
||||
int i;
|
||||
unsigned short rgb;
|
||||
VisualPtr pVisual = pColor->pVisual;
|
||||
Pixel pix;
|
||||
|
||||
if( pVisual->class==TrueColor )
|
||||
{
|
||||
for( i=0 ; i<pVisual->ColormapEntries ; i++ )
|
||||
{
|
||||
rgb = (i<<8)|i;
|
||||
|
||||
pColor->red[i].fShared = FALSE;
|
||||
pColor->red[i].co.local.red = rgb;
|
||||
pColor->red[i].co.local.green = 0;
|
||||
pColor->red[i].co.local.blue = 0;
|
||||
|
||||
pColor->green[i].fShared = FALSE;
|
||||
pColor->green[i].co.local.red = 0;
|
||||
pColor->green[i].co.local.green = rgb;
|
||||
pColor->green[i].co.local.blue = 0;
|
||||
|
||||
pColor->blue[i].fShared = FALSE;
|
||||
pColor->blue[i].co.local.red = 0;
|
||||
pColor->blue[i].co.local.green = 0;
|
||||
pColor->blue[i].co.local.blue = rgb;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return miInitializeColormap(pColor);
|
||||
}
|
||||
|
||||
void
|
||||
PsDestroyColormap(ColormapPtr pColor)
|
||||
{
|
||||
/* NO-OP */
|
||||
}
|
||||
|
||||
void
|
||||
PsInstallColormap(ColormapPtr pColor)
|
||||
{
|
||||
miInstallColormap(pColor);
|
||||
}
|
||||
|
||||
void
|
||||
PsUninstallColormap(ColormapPtr pColor)
|
||||
{
|
||||
miUninstallColormap(pColor);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -132,7 +110,7 @@ PsListInstalledColormaps(
|
|||
ScreenPtr pScreen,
|
||||
XID *pCmapList)
|
||||
{
|
||||
return 0;
|
||||
return miListInstalledColormaps(pScreen, pCmapList);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -160,18 +138,71 @@ PsResolveColor(
|
|||
unsigned short *pBlue,
|
||||
VisualPtr pVisual)
|
||||
{
|
||||
miResolveColor(pRed, pGreen, pBlue, pVisual);
|
||||
}
|
||||
|
||||
int
|
||||
PsOutColor
|
||||
PsGetPixelColor(ColormapPtr cMap, int pixval)
|
||||
{
|
||||
int r, g, b;
|
||||
if( cMap->pVisual->class==TrueColor ) return(pixval);
|
||||
if( pixval<0 || pixval>255 ) return(0);
|
||||
r = cMap->red[pixval].co.local.red>>8;
|
||||
g = cMap->red[pixval].co.local.green>>8;
|
||||
b = cMap->red[pixval].co.local.blue>>8;
|
||||
return((r<<16)|(g<<8)|b);
|
||||
VisualPtr v = cMap->pVisual;
|
||||
switch( v->class )
|
||||
{
|
||||
case TrueColor:
|
||||
{
|
||||
PsOutColor p = pixval;
|
||||
PsOutColor r, g, b;
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
int shift = 16 - v->bitsPerRGBValue;
|
||||
#else
|
||||
int shift = 8 - v->bitsPerRGBValue;
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
|
||||
r = ((p & v->redMask) >> v->offsetRed) << shift;
|
||||
g = ((p & v->greenMask) >> v->offsetGreen) << shift;
|
||||
b = ((p & v->blueMask) >> v->offsetBlue) << shift;
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
return((r<<32)|(g<<16)|b);
|
||||
#else
|
||||
return((r<<16)|(g<<8)|b);
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
}
|
||||
case PseudoColor:
|
||||
case GrayScale:
|
||||
case StaticGray:
|
||||
{
|
||||
PsOutColor r, g, b;
|
||||
|
||||
if( pixval < 0 || pixval > v->ColormapEntries)
|
||||
return(0);
|
||||
|
||||
r = cMap->red[pixval].co.local.red;
|
||||
g = cMap->red[pixval].co.local.green;
|
||||
b = cMap->red[pixval].co.local.blue;
|
||||
|
||||
if ((v->class | DynamicClass) == GrayScale)
|
||||
{
|
||||
/* rescale to gray (see |miResolveColor()|) */
|
||||
r = g = b = (30L*r + 59L*g + 11L*b) / 100L;
|
||||
}
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
return((r<<32)|(g<<16)|b);
|
||||
#else
|
||||
r >>= 8;
|
||||
g >>= 8;
|
||||
b >>= 8;
|
||||
|
||||
return((r<<16)|(g<<8)|b);
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
}
|
||||
default:
|
||||
FatalError("PsGetPixelColor: Unsupported visual %x\n",
|
||||
(int)cMap->pVisual->class);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0; /* NO-OP*/
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -380,6 +380,16 @@ PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc)
|
|||
{
|
||||
GCPtr pDst;
|
||||
|
||||
if (pSrc == NULL) {
|
||||
/* https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 ("'x11perf
|
||||
* -copypixpix500' crashes Xprt's PostScript DDX [PsCreateAndCopyGC"):
|
||||
* I have no clue whether this is the real fix or just wallpapering
|
||||
* over the crash (that's why we warn here loudly when this
|
||||
* happens) ... */
|
||||
fprintf(stderr, "PsCreateAndCopyGC: pSrc == NULL\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((pDst =
|
||||
CreateScratchGC(pDrawable->pScreen, pDrawable->depth)) == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,8 +119,18 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
|||
#endif
|
||||
char **printerNames;
|
||||
int numPrinters;
|
||||
int nVisuals;
|
||||
int nDepths;
|
||||
int nv, /* total number of visuals */
|
||||
nv_1bit, /* number of 8bit visuals */
|
||||
nv_8bit, /* number of 8bit visuals */
|
||||
nv_12bit, /* number of 12bit visuals */
|
||||
nv_24bit, /* number of 24bit visuals*/
|
||||
nv_30bit; /* number of 30bit visuals*/
|
||||
int nd; /* number of depths */
|
||||
VisualID *vids_1bit,
|
||||
*vids_8bit,
|
||||
*vids_12bit,
|
||||
*vids_24bit,
|
||||
*vids_30bit;
|
||||
VisualPtr visuals;
|
||||
DepthPtr depths;
|
||||
VisualID defaultVisual;
|
||||
|
|
@ -179,44 +189,180 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
|||
/* Will BitmapToRegion make any difference at all? */
|
||||
pScreen->BitmapToRegion = mfbPixmapToRegion;
|
||||
|
||||
nVisuals = 2;
|
||||
nDepths = 2;
|
||||
visuals = (VisualPtr)xalloc(nVisuals*sizeof(VisualRec));
|
||||
depths = (DepthPtr) xalloc(nDepths*sizeof(DepthRec));
|
||||
visuals = (VisualPtr) xalloc(8*sizeof(VisualRec));
|
||||
depths = (DepthPtr) xalloc(8*sizeof(DepthRec));
|
||||
vids_1bit = (VisualID *)xalloc(8*sizeof(VisualID));
|
||||
vids_8bit = (VisualID *)xalloc(8*sizeof(VisualID));
|
||||
vids_12bit = (VisualID *)xalloc(8*sizeof(VisualID));
|
||||
vids_24bit = (VisualID *)xalloc(8*sizeof(VisualID));
|
||||
vids_30bit = (VisualID *)xalloc(8*sizeof(VisualID));
|
||||
|
||||
visuals[0].vid = FakeClientID(0);
|
||||
visuals[0].class = TrueColor;
|
||||
visuals[0].bitsPerRGBValue = 8;
|
||||
visuals[0].ColormapEntries = 256;
|
||||
visuals[0].nplanes = 24;
|
||||
visuals[0].redMask = 0x00FF0000;
|
||||
visuals[0].greenMask = 0x0000FF00;
|
||||
visuals[0].blueMask = 0x000000FF;
|
||||
visuals[0].offsetRed = 16;
|
||||
visuals[0].offsetGreen = 8;
|
||||
visuals[0].offsetBlue = 0;
|
||||
nv = nv_1bit = nv_8bit = nv_12bit = nv_24bit = nv_30bit = nd = 0;
|
||||
|
||||
visuals[1].vid = FakeClientID(0);
|
||||
visuals[1].class = PseudoColor;
|
||||
visuals[1].bitsPerRGBValue = 8;
|
||||
visuals[1].ColormapEntries = 256;
|
||||
visuals[1].nplanes = 8;
|
||||
visuals[1].redMask = 0x0;
|
||||
visuals[1].greenMask = 0x0;
|
||||
visuals[1].blueMask = 0x0;
|
||||
visuals[1].offsetRed = 0x0;
|
||||
visuals[1].offsetGreen = 0x0;
|
||||
visuals[1].offsetBlue = 0x0;
|
||||
/* TrueColor, 24bit */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = TrueColor;
|
||||
visuals[nv].bitsPerRGBValue = 8;
|
||||
visuals[nv].ColormapEntries = 256;
|
||||
visuals[nv].nplanes = 24;
|
||||
visuals[nv].redMask = 0X00FF0000;
|
||||
visuals[nv].greenMask = 0X0000FF00;
|
||||
visuals[nv].blueMask = 0X000000FF;
|
||||
visuals[nv].offsetRed = 16;
|
||||
visuals[nv].offsetGreen = 8;
|
||||
visuals[nv].offsetBlue = 0;
|
||||
vids_24bit[nv_24bit] = visuals[nv].vid;
|
||||
nv++; nv_24bit++;
|
||||
|
||||
depths[0].depth = 24;
|
||||
depths[0].numVids = 1;
|
||||
depths[0].vids = (VisualID *)xalloc(sizeof(VisualID));
|
||||
depths[0].vids[0] = visuals[0].vid;
|
||||
/* PseudoColor, 8bit */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = PseudoColor;
|
||||
visuals[nv].bitsPerRGBValue = 8;
|
||||
visuals[nv].ColormapEntries = 256;
|
||||
visuals[nv].nplanes = 8;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_8bit[nv_8bit] = visuals[nv].vid;
|
||||
nv++; nv_8bit++;
|
||||
|
||||
depths[1].depth = 8;
|
||||
depths[1].numVids = 1;
|
||||
depths[1].vids = (VisualID *)xalloc(sizeof(VisualID));
|
||||
depths[1].vids[0] = visuals[1].vid;
|
||||
/* GrayScale, 8bit */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = GrayScale;
|
||||
visuals[nv].bitsPerRGBValue = 8;
|
||||
visuals[nv].ColormapEntries = 256;
|
||||
visuals[nv].nplanes = 8;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_8bit[nv_8bit] = visuals[nv].vid;
|
||||
nv++; nv_8bit++;
|
||||
|
||||
/* StaticGray, 8bit */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = StaticGray;
|
||||
visuals[nv].bitsPerRGBValue = 8;
|
||||
visuals[nv].ColormapEntries = 256;
|
||||
visuals[nv].nplanes = 8;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_8bit[nv_8bit] = visuals[nv].vid;
|
||||
nv++; nv_8bit++;
|
||||
|
||||
/* StaticGray, 1bit */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = StaticGray;
|
||||
visuals[nv].bitsPerRGBValue = 1;
|
||||
visuals[nv].ColormapEntries = 2;
|
||||
visuals[nv].nplanes = 1;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_1bit[nv_1bit] = visuals[nv].vid;
|
||||
nv++; nv_1bit++;
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
/* TrueColor, 30bit, 10bit per R-,G-,B-gun */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = TrueColor;
|
||||
visuals[nv].bitsPerRGBValue = 10;
|
||||
visuals[nv].ColormapEntries = 1024;
|
||||
visuals[nv].nplanes = 30;
|
||||
visuals[nv].redMask = 0X3FF00000;
|
||||
visuals[nv].greenMask = 0X000FFC00;
|
||||
visuals[nv].blueMask = 0X000003FF;
|
||||
visuals[nv].offsetRed = 20;
|
||||
visuals[nv].offsetGreen = 10;
|
||||
visuals[nv].offsetBlue = 0;
|
||||
vids_30bit[nv_30bit] = visuals[nv].vid;
|
||||
nv++; nv_30bit++;
|
||||
|
||||
/* PostScript Level 2 and above, colors can have 12 bits per component
|
||||
* (36 bit for RGB) */
|
||||
|
||||
/* GrayScale, 12bit, 12bit per R-,G-,B-gun */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = GrayScale;
|
||||
visuals[nv].bitsPerRGBValue = 12;
|
||||
visuals[nv].ColormapEntries = 4096;
|
||||
visuals[nv].nplanes = 12;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_12bit[nv_12bit] = visuals[nv].vid;
|
||||
nv++; nv_12bit++;
|
||||
|
||||
/* StaticGray, 12bit, 12bit per R-,G-,B-gun */
|
||||
visuals[nv].vid = FakeClientID(0);
|
||||
visuals[nv].class = StaticGray;
|
||||
visuals[nv].bitsPerRGBValue = 12;
|
||||
visuals[nv].ColormapEntries = 4096;
|
||||
visuals[nv].nplanes = 12;
|
||||
visuals[nv].redMask = 0x0;
|
||||
visuals[nv].greenMask = 0x0;
|
||||
visuals[nv].blueMask = 0x0;
|
||||
visuals[nv].offsetRed = 0x0;
|
||||
visuals[nv].offsetGreen = 0x0;
|
||||
visuals[nv].offsetBlue = 0x0;
|
||||
vids_12bit[nv_12bit] = visuals[nv].vid;
|
||||
nv++; nv_12bit++;
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
|
||||
if( nv_30bit > 0 )
|
||||
{
|
||||
depths[nd].depth = 30;
|
||||
depths[nd].numVids = nv_30bit;
|
||||
depths[nd].vids = vids_30bit;
|
||||
nd++;
|
||||
}
|
||||
|
||||
if( nv_24bit > 0 )
|
||||
{
|
||||
depths[nd].depth = 24;
|
||||
depths[nd].numVids = nv_24bit;
|
||||
depths[nd].vids = vids_24bit;
|
||||
nd++;
|
||||
}
|
||||
|
||||
if( nv_12bit > 0 )
|
||||
{
|
||||
depths[nd].depth = 12;
|
||||
depths[nd].numVids = nv_12bit;
|
||||
depths[nd].vids = vids_12bit;
|
||||
nd++;
|
||||
}
|
||||
|
||||
if( nv_8bit > 0 )
|
||||
{
|
||||
depths[nd].depth = 8;
|
||||
depths[nd].numVids = nv_8bit;
|
||||
depths[nd].vids = vids_8bit;
|
||||
nd++;
|
||||
}
|
||||
|
||||
if( nv_1bit > 0 )
|
||||
{
|
||||
depths[nd].depth = 1;
|
||||
depths[nd].numVids = nv_1bit;
|
||||
depths[nd].vids = vids_1bit;
|
||||
nd++;
|
||||
}
|
||||
|
||||
/* Defaul visual is 8bit PseudoColor */
|
||||
defaultVisual = visuals[1].vid;
|
||||
|
|
@ -228,7 +374,7 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
|||
|
||||
GlxWrapInitVisuals(&proc);
|
||||
/* GlxInitVisuals ignores the last three arguments. */
|
||||
proc(&visuals, &depths, &nVisuals, &nDepths,
|
||||
proc(&visuals, &depths, &nv, &nd,
|
||||
&rootDepth, &defaultVisual, 0, 0, 0);
|
||||
}
|
||||
#endif /* GLXEXT */
|
||||
|
|
@ -237,8 +383,8 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
|||
pScreen->width, pScreen->height,
|
||||
(int) (pScreen->width / (pScreen->mmWidth / 25.40)),
|
||||
(int) (pScreen->height / (pScreen->mmHeight / 25.40)),
|
||||
0, rootDepth, nDepths,
|
||||
depths, defaultVisual, nVisuals, visuals);
|
||||
0, rootDepth, nd,
|
||||
depths, defaultVisual, nv, visuals);
|
||||
|
||||
if( cfbCreateDefColormap(pScreen)==FALSE ) return FALSE;
|
||||
|
||||
|
|
@ -282,12 +428,12 @@ AllocatePsPrivates(ScreenPtr pScreen)
|
|||
*/
|
||||
|
||||
static char DOC_ATT_SUPP[]="document-attributes-supported";
|
||||
static char DOC_ATT_VAL[]="document-format";
|
||||
static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
|
||||
static char JOB_ATT_SUPP[]="job-attributes-supported";
|
||||
static char JOB_ATT_VAL[]="";
|
||||
static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
|
||||
static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
|
||||
default-input-tray default-medium plex";
|
||||
default-input-tray default-medium plex xp-listfonts-modes";
|
||||
|
||||
static int
|
||||
PsInitContext(pCon)
|
||||
|
|
@ -346,7 +492,7 @@ PsInitContext(pCon)
|
|||
server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
|
||||
if ((attrStr = (char *) xalloc(strlen(server) +
|
||||
strlen(DOC_ATT_SUPP) + strlen(DOC_ATT_VAL)
|
||||
+ strlen(PAGE_ATT_VAL) + 6)) == NULL)
|
||||
+ strlen(PAGE_ATT_VAL) + 8)) == NULL)
|
||||
{
|
||||
return BadAlloc;
|
||||
}
|
||||
|
|
@ -360,7 +506,7 @@ PsInitContext(pCon)
|
|||
*/
|
||||
server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
|
||||
if ((attrStr = (char *) xalloc(strlen(server) + strlen(JOB_ATT_SUPP) +
|
||||
strlen(JOB_ATT_VAL) + 4)) == NULL)
|
||||
strlen(JOB_ATT_VAL) + 8)) == NULL)
|
||||
{
|
||||
return BadAlloc;
|
||||
}
|
||||
|
|
@ -373,7 +519,7 @@ PsInitContext(pCon)
|
|||
*/
|
||||
server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
|
||||
if ((attrStr = (char *) xalloc(strlen(server) + strlen(PAGE_ATT_SUPP) +
|
||||
strlen(PAGE_ATT_VAL) + 4)) == NULL)
|
||||
strlen(PAGE_ATT_VAL) + 8)) == NULL)
|
||||
{
|
||||
return BadAlloc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ PsCreatePixmap(
|
|||
{
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec));
|
||||
pPixmap = (PixmapPtr)xcalloc(1, sizeof(PixmapRec));
|
||||
if( !pPixmap) return NullPixmap;
|
||||
pPixmap->drawable.type = DRAWABLE_PIXMAP;
|
||||
pPixmap->drawable.class = 0;
|
||||
|
|
@ -108,20 +108,21 @@ PsCreatePixmap(
|
|||
pPixmap->devKind = 0;
|
||||
pPixmap->refcnt = 1;
|
||||
|
||||
pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xalloc(sizeof(PsPixmapPrivRec));
|
||||
pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec));
|
||||
if( !pPixmap->devPrivate.ptr )
|
||||
{ xfree(pPixmap); return NullPixmap; }
|
||||
memset(pPixmap->devPrivate.ptr, 0, sizeof(PsPixmapPrivRec));
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
Bool
|
||||
PsDestroyPixmap(PixmapPtr pPixmap)
|
||||
/* PsScrubPixmap: Remove all content from a pixmap (used by
|
||||
* |PsPolyFillRect()| when the "solid fill" operation covers
|
||||
* the whole pixmap) */
|
||||
void
|
||||
PsScrubPixmap(PixmapPtr pPixmap)
|
||||
{
|
||||
PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
|
||||
DisplayListPtr disp = priv->dispList;
|
||||
|
||||
if( --pPixmap->refcnt ) return TRUE;
|
||||
while( disp )
|
||||
{
|
||||
int i;
|
||||
|
|
@ -178,6 +179,20 @@ PsDestroyPixmap(PixmapPtr pPixmap)
|
|||
}
|
||||
xfree(oldDisp);
|
||||
}
|
||||
|
||||
priv->dispList = NULL;
|
||||
}
|
||||
|
||||
Bool
|
||||
PsDestroyPixmap(PixmapPtr pPixmap)
|
||||
{
|
||||
PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
|
||||
DisplayListPtr disp = priv->dispList;
|
||||
|
||||
if( --pPixmap->refcnt ) return TRUE;
|
||||
|
||||
PsScrubPixmap(pPixmap);
|
||||
|
||||
xfree(priv);
|
||||
xfree(pPixmap);
|
||||
return TRUE;
|
||||
|
|
@ -192,11 +207,11 @@ PsGetFreeDisplayBlock(PsPixmapPrivPtr priv)
|
|||
{
|
||||
if( disp->nelms>=DPY_BLOCKSIZE && disp->next ) continue;
|
||||
if( disp->nelms<DPY_BLOCKSIZE ) return(disp);
|
||||
disp->next = (DisplayListPtr)xalloc(sizeof(DisplayListRec));
|
||||
disp->next = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
|
||||
disp->next->next = (DisplayListPtr)0;
|
||||
disp->next->nelms = 0;
|
||||
}
|
||||
disp = (DisplayListPtr)xalloc(sizeof(DisplayListRec));
|
||||
disp = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
|
||||
disp->next = (DisplayListPtr)0;
|
||||
disp->nelms = 0;
|
||||
priv->dispList = disp;
|
||||
|
|
@ -480,6 +495,7 @@ PsCreateFillElementList(PixmapPtr pix, int *nElms)
|
|||
|
||||
for( i=0 ; i<disp->nelms ; i++,elm++ )
|
||||
{
|
||||
if( !elm->gc ) continue; /* workaround for https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 */
|
||||
if( !elm->gc->fgPixel ) continue;
|
||||
switch(elm->type)
|
||||
{
|
||||
|
|
@ -498,7 +514,7 @@ PsCreateFillElementList(PixmapPtr pix, int *nElms)
|
|||
|
||||
if( (*nElms) )
|
||||
{
|
||||
elms = (PsElmPtr)xalloc((*nElms)*sizeof(PsElmRec));
|
||||
elms = (PsElmPtr)xcalloc(1, (*nElms)*sizeof(PsElmRec));
|
||||
if( elms )
|
||||
{
|
||||
disp = priv->dispList;
|
||||
|
|
@ -568,7 +584,7 @@ PsCloneFillElementList(int nElms, PsElmPtr elms)
|
|||
int i;
|
||||
PsElmPtr newElms;
|
||||
|
||||
newElms = (PsElmPtr)xalloc(nElms*sizeof(PsElmRec));
|
||||
newElms = (PsElmPtr)xcalloc(1, nElms*sizeof(PsElmRec));
|
||||
if( !newElms ) return(newElms);
|
||||
for( i=0 ; i<nElms ; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -203,6 +203,31 @@ PsPolyFillRect(
|
|||
DisplayListPtr disp;
|
||||
GCPtr gc;
|
||||
|
||||
#ifdef DBE
|
||||
/* Remove previous pixmap content if we render one single rect which
|
||||
* covers the whole pixmap surface (this optimisation was added for
|
||||
* the double-buffer extension ("DBE") which uses |PolyFillRect()|
|
||||
* to clear the buffer - but it makes sense in other cases, too).
|
||||
*/
|
||||
if (nRects == 1)
|
||||
{
|
||||
extern Bool noDbeExtension;
|
||||
|
||||
if ( (pRects[0].x==0) && (pRects[0].y==0) &&
|
||||
(pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) &&
|
||||
(pGC->fillStyle == FillSolid) &&
|
||||
(noDbeExtension == False))
|
||||
{
|
||||
#ifdef DEBUG_gismobile
|
||||
ErrorF("PsPolyFillRect: scrubbing pixmap...\n");
|
||||
#endif /* DEBUG_gismobile */
|
||||
/* Remove all content from the pixmap as it would be covered
|
||||
* by the whole rect anyway */
|
||||
PsScrubPixmap(pDrawable);
|
||||
}
|
||||
}
|
||||
#endif /* DBE */
|
||||
|
||||
if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
|
||||
|
||||
disp = PsGetFreeDisplayBlock(priv);
|
||||
|
|
|
|||
|
|
@ -422,17 +422,19 @@ S_OutTok(PsOutPtr self, char *tok, int cr)
|
|||
}
|
||||
|
||||
static void
|
||||
S_Color(PsOutPtr self, int clr)
|
||||
S_Color(PsOutPtr self, PsOutColor clr)
|
||||
{
|
||||
int ir, ig, ib;
|
||||
ir = clr>>16; ig = (clr>>8)&0xFF; ib = clr&0xFF;
|
||||
ir = PSOUTCOLOR_TO_REDBITS(clr);
|
||||
ig = PSOUTCOLOR_TO_GREENBITS(clr);
|
||||
ib = PSOUTCOLOR_TO_BLUEBITS(clr);
|
||||
if( ir==ig && ig==ib )
|
||||
{ S_OutNum(self, (float)ir/255.); S_OutTok(self, "g", 1); }
|
||||
{ S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); S_OutTok(self, "g", 1); }
|
||||
else
|
||||
{
|
||||
S_OutNum(self, (float)ir/255.);
|
||||
S_OutNum(self, (float)ig/255.);
|
||||
S_OutNum(self, (float)ib/255.);
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
|
||||
S_OutTok(self, "sc", 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -636,7 +638,7 @@ PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, int res,
|
|||
/*
|
||||
* Initialize the structure
|
||||
*/
|
||||
psout->CurColor = 0xFFFFFFFF;
|
||||
psout->CurColor = PSOUTCOLOR_NOCOLOR;
|
||||
psout->LineWidth = 1;
|
||||
psout->LineCap = PsCButt;
|
||||
psout->LineJoin = PsJMiter;
|
||||
|
|
@ -723,7 +725,7 @@ void
|
|||
PsOut_DirtyAttributes(PsOutPtr self)
|
||||
{
|
||||
int i;
|
||||
self->CurColor = 0xFFFFFFFF;
|
||||
self->CurColor = PSOUTCOLOR_NOCOLOR;
|
||||
self->LineWidth = -1;
|
||||
self->LineCap = (PsCapEnum)-1;
|
||||
self->LineJoin = (PsJoinEnum)-1;
|
||||
|
|
@ -911,7 +913,7 @@ PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf)
|
|||
}
|
||||
|
||||
void
|
||||
PsOut_Color(PsOutPtr self, int clr)
|
||||
PsOut_Color(PsOutPtr self, PsOutColor clr)
|
||||
{
|
||||
if( clr==self->CurColor || self->InTile>=PsStip ) return;
|
||||
self->CurColor = clr;
|
||||
|
|
@ -926,7 +928,7 @@ PsOut_FillRule(PsOutPtr self, PsRuleEnum rule)
|
|||
|
||||
void
|
||||
PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, PsJoinEnum join,
|
||||
int nDsh, int *dsh, int dshOff, int bclr)
|
||||
int nDsh, int *dsh, int dshOff, PsOutColor bclr)
|
||||
{
|
||||
int i;
|
||||
int same = 1;
|
||||
|
|
@ -973,7 +975,10 @@ PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, PsJoinEnum join,
|
|||
S_OutTok(self, "ds", 1);
|
||||
}
|
||||
|
||||
if( nDsh ) self->LineBClr = bclr; else bclr = -1;
|
||||
if( nDsh )
|
||||
self->LineBClr = bclr;
|
||||
else
|
||||
bclr = PSOUTCOLOR_NOCOLOR;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1094,7 +1099,7 @@ PsOut_Lines(PsOutPtr self, int nPts, PsPointPtr pts)
|
|||
if( i==0 ) S_OutTok(self, "m", 0);
|
||||
else S_OutTok(self, "l", 0);
|
||||
}
|
||||
if( self->LineBClr>=0 )
|
||||
if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
|
||||
{
|
||||
S_OutTok(self, "gs", 0);
|
||||
S_Color(self, self->LineBClr);
|
||||
|
|
@ -1133,7 +1138,7 @@ PsOut_DrawRect(PsOutPtr self, int x, int y, int w, int h)
|
|||
S_OutNum(self, (float)w);
|
||||
S_OutNum(self, (float)h);
|
||||
S_OutTok(self, "R", 0);
|
||||
if( self->LineBClr>=0 )
|
||||
if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
|
||||
{
|
||||
S_OutTok(self, "gs", 0);
|
||||
S_Color(self, self->LineBClr);
|
||||
|
|
@ -1159,7 +1164,7 @@ PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h,
|
|||
S_OutNum(self, ang1+ang2);
|
||||
if( ang2<0 ) S_OutTok(self, "An", 0);
|
||||
else S_OutTok(self, "Ac", 0);
|
||||
if( self->LineBClr>=0 )
|
||||
if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
|
||||
{
|
||||
S_OutTok(self, "gs", 0);
|
||||
S_Color(self, self->LineBClr);
|
||||
|
|
@ -1169,7 +1174,7 @@ PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h,
|
|||
}
|
||||
|
||||
void
|
||||
PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, int bclr)
|
||||
PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, PsOutColor bclr)
|
||||
{
|
||||
int xo = self->XOff;
|
||||
int yo = self->YOff;
|
||||
|
|
@ -1179,21 +1184,23 @@ PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, int bclr)
|
|||
S_OutStr(self, text, textl);
|
||||
S_OutNum(self, (float)x);
|
||||
S_OutNum(self, (float)y);
|
||||
if( bclr<0 ) S_OutTok(self, "T", 1);
|
||||
if( bclr == PSOUTCOLOR_NOCOLOR )
|
||||
S_OutTok(self, "T", 1);
|
||||
else
|
||||
{
|
||||
int ir = bclr>>16;
|
||||
int ig = (bclr>>8)&0xFF;
|
||||
int ib = bclr&0xFF;
|
||||
S_OutNum(self, (float)ir/255.);
|
||||
S_OutNum(self, (float)ig/255.);
|
||||
S_OutNum(self, (float)ib/255.);
|
||||
int ir = PSOUTCOLOR_TO_REDBITS(bclr);
|
||||
int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
|
||||
int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
|
||||
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
|
||||
S_OutTok(self, "Tb", 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, int bclr)
|
||||
PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr)
|
||||
{
|
||||
int xo = self->XOff;
|
||||
int yo = self->YOff;
|
||||
|
|
@ -1203,22 +1210,23 @@ PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, int b
|
|||
S_OutStr16(self, text, textl);
|
||||
S_OutNum(self, (float)x);
|
||||
S_OutNum(self, (float)y);
|
||||
if( bclr<0 ) S_OutTok(self, "T", 1);
|
||||
if( bclr == PSOUTCOLOR_NOCOLOR )
|
||||
S_OutTok(self, "T", 1);
|
||||
else
|
||||
{
|
||||
int ir = bclr>>16;
|
||||
int ig = (bclr>>8)&0xFF;
|
||||
int ib = bclr&0xFF;
|
||||
S_OutNum(self, (float)ir/255.);
|
||||
S_OutNum(self, (float)ig/255.);
|
||||
S_OutNum(self, (float)ib/255.);
|
||||
int ir = PSOUTCOLOR_TO_REDBITS(bclr);
|
||||
int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
|
||||
int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
|
||||
S_OutTok(self, "Tb", 1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BM_CACHE
|
||||
void /* new */
|
||||
PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, int bclr, int fclr)
|
||||
PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, PsOutColor bclr, PsOutColor fclr)
|
||||
{
|
||||
char cacheID[10];
|
||||
int xo = self->XOff;
|
||||
|
|
@ -1231,22 +1239,26 @@ PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, int bclr, int fclr)
|
|||
S_OutNum(self, (float)x);
|
||||
S_OutNum(self, (float)y);
|
||||
|
||||
if( fclr==0xFFFFFF )
|
||||
if( fclr==PSOUTCOLOR_WHITE )
|
||||
{
|
||||
int ir, ig, ib;
|
||||
ir = bclr>>16; ig = (bclr>>8)&0xFF; ib = bclr&0xFF;
|
||||
int ir = PSOUTCOLOR_TO_REDBITS(bclr);
|
||||
int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
|
||||
int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
|
||||
|
||||
if( ir==ig && ig==ib )
|
||||
S_OutNum(self, (float)ir/255.);
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
|
||||
else
|
||||
S_OutNum(self, (float)0);
|
||||
self->RevImage = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int ir, ig, ib;
|
||||
ir = fclr>>16; ig = (fclr>>8)&0xFF; ib = fclr&0xFF;
|
||||
int ir = PSOUTCOLOR_TO_REDBITS(fclr);
|
||||
int ig = PSOUTCOLOR_TO_GREENBITS(fclr);
|
||||
int ib = PSOUTCOLOR_TO_BLUEBITS(fclr);
|
||||
|
||||
if( ir==ig && ig==ib )
|
||||
S_OutNum(self, (float)ir/255.);
|
||||
S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
|
||||
else
|
||||
S_OutNum(self, (float)0);
|
||||
}
|
||||
|
|
@ -1272,10 +1284,10 @@ PsOut_EndImageCache(PsOutPtr self)
|
|||
#endif
|
||||
|
||||
void
|
||||
PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
|
||||
PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
|
||||
int w, int h, int sw, int sh, int format)
|
||||
{
|
||||
int savClr = self->CurColor;
|
||||
PsOutColor savClr = self->CurColor;
|
||||
int xo = self->XOff;
|
||||
int yo = self->YOff;
|
||||
|
||||
|
|
@ -1291,7 +1303,7 @@ PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
|
|||
S_OutTok(self, "<", 0);
|
||||
self->ImageFormat = format;
|
||||
self->RevImage = 0;
|
||||
if( self->InTile==PsTile && format==1 && fclr==0xFFFFFF )
|
||||
if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
|
||||
self->RevImage = 1;
|
||||
return;
|
||||
}
|
||||
|
|
@ -1300,7 +1312,7 @@ PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
|
|||
if( format==1 )
|
||||
{
|
||||
S_OutTok(self, "gs", 0);
|
||||
if( fclr==0xFFFFFF )
|
||||
if( fclr==PSOUTCOLOR_WHITE )
|
||||
{
|
||||
PsOut_Color(self, fclr);
|
||||
PsOut_FillRect(self, x, y, sw, sh);
|
||||
|
|
@ -1332,10 +1344,10 @@ PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
|
|||
}
|
||||
|
||||
void
|
||||
PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
|
||||
PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
|
||||
int w, int h, int sw, int sh, int format)
|
||||
{
|
||||
int savClr = self->CurColor;
|
||||
PsOutColor savClr = self->CurColor;
|
||||
int xo = self->XOff;
|
||||
int yo = self->YOff;
|
||||
|
||||
|
|
@ -1351,7 +1363,7 @@ PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
|
|||
S_OutTok(self, "<", 0);
|
||||
self->ImageFormat = format;
|
||||
self->RevImage = 0;
|
||||
if( self->InTile==PsTile && format==1 && fclr==0xFFFFFF )
|
||||
if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
|
||||
self->RevImage = 1;
|
||||
return;
|
||||
}
|
||||
|
|
@ -1363,7 +1375,7 @@ PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
|
|||
#ifdef BM_CACHE
|
||||
S_OutTok(self, "g", 1);
|
||||
#else
|
||||
if( fclr==0xFFFFFF )
|
||||
if( fclr==PSOUTCOLOR_WHITE )
|
||||
{
|
||||
PsOut_Color(self, bclr);
|
||||
self->RevImage = 1;
|
||||
|
|
@ -1411,7 +1423,7 @@ PsOut_EndImage(PsOutPtr self)
|
|||
S_OutTok(self, ">", 1);
|
||||
if( self->ImageFormat==1 && self->InTile==PsTile )
|
||||
{
|
||||
if( self->ImgFClr==0xFFFFFF )
|
||||
if( self->ImgFClr==PSOUTCOLOR_WHITE )
|
||||
{
|
||||
PsOut_Color(self, self->ImgFClr);
|
||||
PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH);
|
||||
|
|
@ -1436,14 +1448,16 @@ PsOut_EndImage(PsOutPtr self)
|
|||
self->RevImage = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Bug 4639307: Move flush before "> im" to get all of bitmap into ps file.
|
||||
*/
|
||||
S_Flush(self);
|
||||
#ifdef BM_CACHE
|
||||
if(self->start_image)
|
||||
S_OutTok(self, "> im", 1); /* new */
|
||||
#endif
|
||||
self->ImageFormat = 0;
|
||||
self->RevImage = 0;
|
||||
S_Flush(self);
|
||||
#ifdef BM_CACHE
|
||||
if(self->start_image)
|
||||
{
|
||||
|
|
@ -1509,7 +1523,7 @@ PsOut_EndFrame(PsOutPtr self)
|
|||
|
||||
int
|
||||
PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, PsFillEnum type,
|
||||
int bclr, int fclr)
|
||||
PsOutColor bclr, PsOutColor fclr)
|
||||
{
|
||||
int i;
|
||||
char key[64];
|
||||
|
|
@ -1585,7 +1599,7 @@ PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type)
|
|||
case PsOpStip: key[0] = 'o'; break; }
|
||||
S_OutTok(self, key, 0);
|
||||
S_OutTok(self, "spt", 1);
|
||||
self->CurColor = 0xFFFFFFFF;
|
||||
self->CurColor = PSOUTCOLOR_NOCOLOR;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -153,6 +153,30 @@ typedef enum PsFTDownloadFontType_
|
|||
PsFontType3
|
||||
} PsFTDownloadFontType;
|
||||
|
||||
#ifdef PSOUT_USE_DEEPCOLOR
|
||||
typedef long long PsOutColor;
|
||||
#define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 32)
|
||||
#define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 16) & 0xFFFF)
|
||||
#define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFFFF)
|
||||
#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 65535.)
|
||||
#define PSOUTCOLOR_WHITE (0xFFFFFFFFFFFFLL)
|
||||
#define PSOUTCOLOR_NOCOLOR (-1LL)
|
||||
#define PSOUTCOLOR_TO_RGB24BIT(clr) (((PSOUTCOLOR_TO_REDBITS(clr) >> 8) << 16) | \
|
||||
((PSOUTCOLOR_TO_GREENBITS(clr) >> 8) << 8) | \
|
||||
((PSOUTCOLOR_TO_BLUEBITS(clr) >> 8) << 0))
|
||||
#else
|
||||
typedef long PsOutColor;
|
||||
#define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 16)
|
||||
#define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 8) & 0xFF)
|
||||
#define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFF)
|
||||
#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 255.)
|
||||
#define PSOUTCOLOR_WHITE (0xFFFFFF)
|
||||
#define PSOUTCOLOR_NOCOLOR (-1)
|
||||
#define PSOUTCOLOR_TO_RGB24BIT(clr) ((PSOUTCOLOR_TO_REDBITS(clr) << 16) | \
|
||||
(PSOUTCOLOR_TO_GREENBITS(clr) << 8) | \
|
||||
(PSOUTCOLOR_TO_BLUEBITS(clr) << 0))
|
||||
#endif /* PSOUT_USE_DEEPCOLOR */
|
||||
|
||||
#ifdef USE_PSOUT_PRIVATE
|
||||
typedef void *voidPtr;
|
||||
|
||||
|
|
@ -168,14 +192,14 @@ typedef struct PsOutRec_
|
|||
{
|
||||
FILE *Fp;
|
||||
char Buf[16384];
|
||||
int CurColor;
|
||||
PsOutColor CurColor;
|
||||
int LineWidth;
|
||||
PsCapEnum LineCap;
|
||||
PsJoinEnum LineJoin;
|
||||
int NDashes;
|
||||
int *Dashes;
|
||||
int DashOffset;
|
||||
int LineBClr;
|
||||
PsOutColor LineBClr;
|
||||
PsRuleEnum FillRule;
|
||||
char *FontName;
|
||||
int FontSize;
|
||||
|
|
@ -193,8 +217,8 @@ typedef struct PsOutRec_
|
|||
|
||||
PsFillEnum InTile;
|
||||
int ImgSkip;
|
||||
int ImgBClr;
|
||||
int ImgFClr;
|
||||
PsOutColor ImgBClr;
|
||||
PsOutColor ImgFClr;
|
||||
int ImgX;
|
||||
int ImgY;
|
||||
int ImgW;
|
||||
|
|
@ -230,11 +254,11 @@ extern void PsOut_Offset(PsOutPtr self, int x, int y);
|
|||
|
||||
extern void PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf);
|
||||
|
||||
extern void PsOut_Color(PsOutPtr self, int clr);
|
||||
extern void PsOut_Color(PsOutPtr self, PsOutColor clr);
|
||||
extern void PsOut_FillRule(PsOutPtr self, PsRuleEnum rule);
|
||||
extern void PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap,
|
||||
PsJoinEnum join, int nDsh, int *dsh, int dshOff,
|
||||
int bclr);
|
||||
PsOutColor bclr);
|
||||
extern void PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso);
|
||||
extern void PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso);
|
||||
|
||||
|
|
@ -250,12 +274,12 @@ extern void PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h,
|
|||
float ang1, float ang2);
|
||||
|
||||
extern void PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl,
|
||||
int bclr);
|
||||
extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, int bclr);
|
||||
PsOutColor bclr);
|
||||
extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr);
|
||||
|
||||
extern void PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
|
||||
extern void PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
|
||||
int w, int h, int sw, int sh, int format);
|
||||
extern void PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
|
||||
extern void PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
|
||||
int w, int h, int sw, int sh, int format);
|
||||
extern void PsOut_EndImage(PsOutPtr self);
|
||||
extern void PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes);
|
||||
|
|
@ -265,7 +289,7 @@ extern void PsOut_BeginFrame(PsOutPtr self, int xoff, int yoff, int x, int y,
|
|||
extern void PsOut_EndFrame(PsOutPtr self);
|
||||
|
||||
extern int PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h,
|
||||
PsFillEnum type, int bclr, int fclr);
|
||||
PsFillEnum type, PsOutColor bclr, PsOutColor fclr);
|
||||
extern void PsOut_EndPattern(PsOutPtr self);
|
||||
extern void PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type);
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ copyright holders.
|
|||
"| sort -u` " \
|
||||
"| nawk -F: ' NF == 2 { name=$1 } " \
|
||||
" NF == 1 { sub(\"^.*description\\( - undefined|=\\)\",\"\"); " \
|
||||
" printf \"%sxp-printerattr.descriptor=%s\\n\", name, $1 } '"
|
||||
" printf \"%s\txp-printerattr.descriptor=%s\\n\", name, $1 } '"
|
||||
|
||||
#define LIST_QUEUES_OTHER \
|
||||
"LANG=C lpstat -v | " \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.5 2004/07/31 01:48:27 anholt Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
|
||||
/************************************************************
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ Dispatch(void)
|
|||
register int nready;
|
||||
register HWEventQueuePtr* icheck = checkForInput;
|
||||
#ifdef SMART_SCHEDULE
|
||||
int start_tick;
|
||||
long start_tick;
|
||||
#endif
|
||||
|
||||
nextFreeClientID = 1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.3 2004/06/30 20:06:53 kem Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
|
@ -689,7 +689,7 @@ AddScreen(
|
|||
if (i == MAXSCREENS)
|
||||
return -1;
|
||||
|
||||
pScreen = (ScreenPtr) xalloc(sizeof(ScreenRec));
|
||||
pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec));
|
||||
if (!pScreen)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
4
fb/fb.h
4
fb/fb.h
|
|
@ -22,7 +22,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $XdotOrg: xc/programs/Xserver/fb/fb.h,v 1.6 2004/08/11 21:14:17 kem Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
|
||||
#ifndef _FB_H_
|
||||
#define _FB_H_
|
||||
|
|
@ -647,7 +647,7 @@ typedef struct {
|
|||
((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr)
|
||||
#endif
|
||||
|
||||
#if defined(__DARWIN__)||defined(__CYGWIN__)
|
||||
#ifdef ROOTLESS
|
||||
#define __fbPixOriginX(pPix) ((pPix)->drawable.x)
|
||||
#define __fbPixOriginY(pPix) ((pPix)->drawable.y)
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/fb/fbwindow.c,v 1.4 2004/08/13 08:16:14 keithp Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/*
|
||||
* Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
|
||||
*
|
||||
|
|
@ -122,12 +122,9 @@ fbCopyWindow(WindowPtr pWin,
|
|||
{
|
||||
RegionRec rgnDst;
|
||||
int dx, dy;
|
||||
#ifdef COMPOSITE
|
||||
|
||||
PixmapPtr pPixmap = fbGetWindowPixmap (pWin);
|
||||
DrawablePtr pDrawable = &pPixmap->drawable;
|
||||
#else
|
||||
DrawablePtr pDrawable = &WindowTable[pWin->drawable.pScreen->myNum]->drawable;
|
||||
#endif
|
||||
|
||||
dx = ptOldOrg.x - pWin->drawable.x;
|
||||
dy = ptOldOrg.y - pWin->drawable.y;
|
||||
|
|
|
|||
|
|
@ -1076,7 +1076,12 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
|
|||
|
||||
extern volatile unsigned char *ioBase;
|
||||
|
||||
# define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
|
||||
#if defined(linux) && defined(__powerpc64__)
|
||||
# include <asm/memory.h>
|
||||
#endif /* defined(linux) && defined(__powerpc64__) */
|
||||
#ifndef eieio /* We deal with arch-specific eieio() routines above... */
|
||||
# define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
|
||||
#endif /* eieio */
|
||||
|
||||
static __inline__ unsigned char
|
||||
xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
|
||||
|
|
|
|||
|
|
@ -731,19 +731,13 @@ configureDDCMonitorSection (int screennum)
|
|||
|
||||
for (i=0;i<4;i++) {
|
||||
switch (ConfiguredMonitor->det_mon[i].type) {
|
||||
case DT:
|
||||
case DS_STD_TIMINGS:
|
||||
case DS_WHITE_P:
|
||||
break;
|
||||
case DS_NAME:
|
||||
ptr->mon_modelname = xf86confrealloc(ptr->mon_modelname,
|
||||
strlen((char*)(ConfiguredMonitor->det_mon[i].section.name))
|
||||
+ 1);
|
||||
strcpy(ptr->mon_modelname,
|
||||
(char*)(ConfiguredMonitor->det_mon[i].section.name));
|
||||
break;
|
||||
case DS_ASCII_STR:
|
||||
case DS_SERIAL:
|
||||
break;
|
||||
case DS_RANGES:
|
||||
ptr->mon_hsync[ptr->mon_n_hsync].lo =
|
||||
ConfiguredMonitor->det_mon[i].section.ranges.min_h;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
|
||||
/* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.3 2004/07/30 20:56:53 eich Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
|
||||
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
|
||||
|
||||
|
|
@ -1333,6 +1333,10 @@ xf86VTSwitch()
|
|||
#ifdef DEBUG
|
||||
ErrorF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
||||
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
||||
#endif
|
||||
#ifdef DPMSExtension
|
||||
if (DPMSPowerLevel != DPMSModeOn)
|
||||
DPMSSet(DPMSModeOn);
|
||||
#endif
|
||||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
if (!(dispatchException & DE_TERMINATE))
|
||||
|
|
@ -1353,13 +1357,9 @@ xf86VTSwitch()
|
|||
}
|
||||
#endif /* !__UNIXOS2__ */
|
||||
xf86EnterServerState(SETUP);
|
||||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
#ifdef DPMSExtension
|
||||
if (xf86Screens[i]->DPMSSet)
|
||||
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
|
||||
#endif
|
||||
for (i = 0; i < xf86NumScreens; i++)
|
||||
xf86Screens[i]->LeaveVT(i, 0);
|
||||
}
|
||||
|
||||
for (ih = InputHandlers; ih; ih = ih->next)
|
||||
xf86DisableInputHandler(ih);
|
||||
xf86AccessLeave(); /* We need this here, otherwise */
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ extern int xtest_command_key;
|
|||
#ifdef DPMSExtension
|
||||
#define DPMS_SERVER
|
||||
#include "extensions/dpms.h"
|
||||
#include "dpmsproc.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1244,7 +1245,7 @@ AbortDDX()
|
|||
/*
|
||||
* try to deinitialize all input devices
|
||||
*/
|
||||
if (xf86Info.pKeyboard)
|
||||
if (xf86Info.kbdProc && xf86Info.pKeyboard)
|
||||
(xf86Info.kbdProc)(xf86Info.pKeyboard, DEVICE_CLOSE);
|
||||
|
||||
/*
|
||||
|
|
@ -1253,6 +1254,10 @@ AbortDDX()
|
|||
#ifdef HAS_USL_VTS
|
||||
/* Need the sleep when starting X from within another X session */
|
||||
sleep(1);
|
||||
#endif
|
||||
#ifdef DPMSExtension /* Turn screens back on */
|
||||
if (DPMSPowerLevel != DPMSModeOn)
|
||||
DPMSSet(DPMSModeOn);
|
||||
#endif
|
||||
if (xf86Screens) {
|
||||
if (xf86Screens[0]->vtSema)
|
||||
|
|
@ -1265,10 +1270,6 @@ AbortDDX()
|
|||
* screen explicitely.
|
||||
*/
|
||||
xf86EnableAccess(xf86Screens[i]);
|
||||
#ifdef DPMSExtension
|
||||
if (xf86Screens[i]->DPMSSet)
|
||||
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
|
||||
#endif
|
||||
(xf86Screens[i]->LeaveVT)(i, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1763,8 +1764,22 @@ xf86PrintBanner()
|
|||
#endif
|
||||
|
||||
#if XORG_VERSION_SNAP >= 900
|
||||
ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
|
||||
XORG_VERSION_SNAP - 900);
|
||||
/* When the patch number is 99, that signifies that the we are making
|
||||
* a release candidate for a major version; however, if the patch
|
||||
* number is < 99, then we are making a release candidate for the next
|
||||
* point release.
|
||||
*/
|
||||
if (XORG_VERSION_PATCH == 99)
|
||||
ErrorF(" (%d.%d.0 RC %d)",
|
||||
XORG_VERSION_MAJOR,
|
||||
XORG_VERSION_MINOR + 1,
|
||||
XORG_VERSION_SNAP - 900);
|
||||
else
|
||||
ErrorF(" (%d.%d.%d RC %d)",
|
||||
XORG_VERSION_MAJOR,
|
||||
XORG_VERSION_MINOR,
|
||||
XORG_VERSION_PATCH + 1,
|
||||
XORG_VERSION_SNAP - 900);
|
||||
#endif
|
||||
|
||||
#ifdef XORG_CUSTOM_VERSION
|
||||
|
|
|
|||
|
|
@ -932,10 +932,15 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
|||
/* modeled from xf86Events.c */
|
||||
if (device->ptrfeed->ctrl.threshold) {
|
||||
if ((abs(dx) + abs(dy)) >= device->ptrfeed->ctrl.threshold) {
|
||||
valuator[0] = (dx * device->ptrfeed->ctrl.num) /
|
||||
device->ptrfeed->ctrl.den;
|
||||
valuator[1] = (dy * device->ptrfeed->ctrl.num) /
|
||||
device->ptrfeed->ctrl.den;
|
||||
local->dxremaind = ((float)dx * (float)(device->ptrfeed->ctrl.num)) /
|
||||
(float)(device->ptrfeed->ctrl.den) + local->dxremaind;
|
||||
valuator[0] = (int)local->dxremaind;
|
||||
local->dxremaind = local->dxremaind - (float)valuator[0];
|
||||
|
||||
local->dyremaind = ((float)dy * (float)(device->ptrfeed->ctrl.num)) /
|
||||
(float)(device->ptrfeed->ctrl.den) + local->dyremaind;
|
||||
valuator[1] = (int)local->dyremaind;
|
||||
local->dyremaind = local->dyremaind - (float)valuator[1];
|
||||
}
|
||||
}
|
||||
else if (dx || dy) {
|
||||
|
|
|
|||
|
|
@ -104,9 +104,6 @@ static PciBusPtr xf86PciBus = NULL;
|
|||
|
||||
#define PCI_MEM32_LENGTH_MAX 0xFFFFFFFF
|
||||
|
||||
#undef MIN
|
||||
#define MIN(x,y) ((x<y)?x:y)
|
||||
|
||||
#define B2M(tag,base) pciBusAddrToHostAddr(tag,PCI_MEM,base)
|
||||
#define B2I(tag,base) (base)
|
||||
#define B2H(tag,base,type) (((type & ResPhysMask) == ResMem) ? \
|
||||
|
|
@ -307,7 +304,7 @@ FindPCIVideoInfo(void)
|
|||
mem64 = TRUE;
|
||||
#if defined(LONG64) || defined(WORD64)
|
||||
info->memBase[0] |=
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base1) << 32;
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base0) << 32;
|
||||
#else
|
||||
if (pcrp->pci_base1)
|
||||
info->memBase[0] = 0;
|
||||
|
|
@ -327,7 +324,7 @@ FindPCIVideoInfo(void)
|
|||
mem64 = TRUE;
|
||||
#if defined(LONG64) || defined(WORD64)
|
||||
info->memBase[1] |=
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base2) << 32;
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base1) << 32;
|
||||
#else
|
||||
if (pcrp->pci_base2)
|
||||
info->memBase[1] = 0;
|
||||
|
|
@ -348,7 +345,7 @@ FindPCIVideoInfo(void)
|
|||
mem64 = TRUE;
|
||||
#if defined(LONG64) || defined(WORD64)
|
||||
info->memBase[2] |=
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base3) << 32;
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base2) << 32;
|
||||
#else
|
||||
if (pcrp->pci_base3)
|
||||
info->memBase[2] = 0;
|
||||
|
|
@ -369,7 +366,7 @@ FindPCIVideoInfo(void)
|
|||
mem64 = TRUE;
|
||||
#if defined(LONG64) || defined(WORD64)
|
||||
info->memBase[3] |=
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base4) << 32;
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base3) << 32;
|
||||
#else
|
||||
if (pcrp->pci_base4)
|
||||
info->memBase[3] = 0;
|
||||
|
|
@ -390,7 +387,7 @@ FindPCIVideoInfo(void)
|
|||
mem64 = TRUE;
|
||||
#if defined(LONG64) || defined(WORD64)
|
||||
info->memBase[4] |=
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base5) << 32;
|
||||
(memType)PCIGETMEMORY64HIGH(pcrp->pci_base4) << 32;
|
||||
#else
|
||||
if (pcrp->pci_base5)
|
||||
info->memBase[4] = 0;
|
||||
|
|
@ -1649,7 +1646,7 @@ getValidBIOSBase(PCITAG tag, int num)
|
|||
m = xf86JoinResLists(m,tmp);
|
||||
tmp = m;
|
||||
while (tmp) {
|
||||
tmp->block_end = MIN(tmp->block_end,PCI_MEM32_LENGTH_MAX);
|
||||
tmp->block_end = min(tmp->block_end,PCI_MEM32_LENGTH_MAX);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
} else if ((pbp->primary == pvp->bus) &&
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
#ifndef _EDID_H_
|
||||
#define _EDID_H_ 1
|
||||
#define _EDID_H_
|
||||
|
||||
#include "vdif.h"
|
||||
|
||||
|
|
@ -126,7 +126,9 @@
|
|||
#define SETUP _SETUP(GET(D_INPUT))
|
||||
#define _SYNC(x) (x & 0x0F)
|
||||
#define SYNC _SYNC(GET(D_INPUT))
|
||||
#define _GAMMA(x) ((x + 100.0)/100.0)
|
||||
#define _DFP(x) (x & 0x01)
|
||||
#define DFP _DFP(GET(D_INPUT))
|
||||
#define _GAMMA(x) (x == 0xff ? 1.0 : ((x + 100.0)/100.0))
|
||||
#define GAMMA _GAMMA(GET(D_GAMMA))
|
||||
#define HSIZE_MAX GET(D_HSIZE)
|
||||
#define VSIZE_MAX GET(D_VSIZE)
|
||||
|
|
@ -158,20 +160,28 @@
|
|||
#define T_MANU GET(E_TMANU)
|
||||
|
||||
/* extract information from estabished timing section */
|
||||
#define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \
|
||||
|| ((x[0] == 0x00) && (x[1] == 0x00)) \
|
||||
|| ((x[0] == 0x20) && (x[1] == 0x20)) )
|
||||
|
||||
#define VALID_TIMING _VALID_TIMING(c)
|
||||
#define _HSIZE1(x) ((x[0] + 31) * 8)
|
||||
#define HSIZE1 _HSIZE1(c)
|
||||
#define RATIO(x) ((x[1] & 0xC0) >> 6)
|
||||
#define RATIO1_1 0
|
||||
/* EDID Ver. 1.3 redefined this */
|
||||
#define RATIO16_10 RATIO1_1
|
||||
#define RATIO4_3 1
|
||||
#define RATIO5_4 2
|
||||
#define RATIO16_9 3
|
||||
#define _VSIZE1(x,y) switch(RATIO(x)){ \
|
||||
case RATIO1_1: y = _HSIZE1(x); break; \
|
||||
#define _VSIZE1(x,y,r) switch(RATIO(x)){ \
|
||||
case RATIO1_1: y = ((v->version > 1 || v->revision > 2) \
|
||||
? (_HSIZE1(x) * 10) / 16 : _HSIZE1(x)); break; \
|
||||
case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \
|
||||
case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \
|
||||
case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \
|
||||
}
|
||||
#define VSIZE1(x) _VSIZE1(c,x)
|
||||
#define VSIZE1(x) _VSIZE1(c,x,v)
|
||||
#define _REFRESH_R(x) (x[1] & 0x3F) + 60
|
||||
#define REFRESH_R _REFRESH_R(c)
|
||||
#define _ID_LOW(x) x[0]
|
||||
|
|
@ -183,7 +193,7 @@
|
|||
#define NEXT_STD_TIMING _NEXT_STD_TIMING(c)
|
||||
|
||||
|
||||
/* EDID Ver. > 1.2 */
|
||||
/* EDID Ver. >= 1.2 */
|
||||
#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0 && x[2] == 0 && x[4] == 0)
|
||||
#define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
|
||||
#define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
|
||||
|
|
@ -214,8 +224,10 @@
|
|||
#define V_BORDER _V_BORDER(c)
|
||||
#define _INTERLACED(x) ((x[17] & 0x80) >> 7)
|
||||
#define INTERLACED _INTERLACED(c)
|
||||
#define _STEREO(x) ((x[17] & 0x60) >> 6)
|
||||
#define _STEREO(x) ((x[17] & 0x60) >> 5)
|
||||
#define STEREO _STEREO(c)
|
||||
#define _STEREO1(x) (x[17] & 0x1)
|
||||
#define STEREO1 _STEREO(c)
|
||||
#define _SYNC_T(x) ((x[17] & 0x18) >> 4)
|
||||
#define SYNC_T _SYNC_T(c)
|
||||
#define _MISC(x) ((x[17] & 0x06) >> 2)
|
||||
|
|
@ -236,6 +248,18 @@
|
|||
#define MAX_H _MAX_H(c)
|
||||
#define _MAX_CLOCK(x) x[9]
|
||||
#define MAX_CLOCK _MAX_CLOCK(c)
|
||||
#define _HAVE_2ND_GTF(x) (x[10] == 0x02)
|
||||
#define HAVE_2ND_GTF _HAVE_2ND_GTF(c)
|
||||
#define _F_2ND_GTF(x) (x[12] * 2)
|
||||
#define F_2ND_GTF _F_2ND_GTF(c)
|
||||
#define _C_2ND_GTF(x) (x[13] / 2)
|
||||
#define C_2ND_GTF _C_2ND_GTF(c)
|
||||
#define _M_2ND_GTF(x) (x[14] + (x[15] << 8))
|
||||
#define M_2ND_GTF _M_2ND_GTF(c)
|
||||
#define _K_2ND_GTF(x) (x[16])
|
||||
#define K_2ND_GTF _K_2ND_GTF(c)
|
||||
#define _J_2ND_GTF(x) (x[17] / 2)
|
||||
#define J_2ND_GTF _J_2ND_GTF(c)
|
||||
#define MONITOR_NAME 0xFC
|
||||
#define ADD_COLOR_POINT 0xFB
|
||||
#define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
|
||||
|
|
@ -255,6 +279,7 @@
|
|||
#define _WHITE_GAMMA2(x) _GAMMA(x[14])
|
||||
#define WHITE_GAMMA2 _WHITE_GAMMA2(c)
|
||||
#define ADD_STD_TIMINGS 0xFA
|
||||
#define ADD_DUMMY 0x10
|
||||
|
||||
#define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
|
||||
#define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c)
|
||||
|
|
@ -264,6 +289,9 @@
|
|||
/* input type */
|
||||
#define DIGITAL(x) x
|
||||
|
||||
/* DFP */
|
||||
#define DFP1(x) x
|
||||
|
||||
/* input voltage level */
|
||||
#define V070 0 /* 0.700V/0.300V */
|
||||
#define V071 1 /* 0.714V/0.286V */
|
||||
|
|
@ -297,8 +325,12 @@
|
|||
/* detailed timing misc */
|
||||
#define IS_INTERLACED(x) (x)
|
||||
#define IS_STEREO(x) (x)
|
||||
#define IS_RIGHT_ON_SYNC(x) (x & 0x01)
|
||||
#define IS_LEFT_ON_SYNC(x) (x & 0x02)
|
||||
#define IS_RIGHT_STEREO(x) (x & 0x01)
|
||||
#define IS_LEFT_STEREO(x) (x & 0x02)
|
||||
#define IS_4WAY_STEREO(x) (x & 0x03)
|
||||
#define IS_RIGHT_ON_SYNC(x) IS_RIGHT_STEREO(x)
|
||||
#define IS_LEFT_ON_SYNC(x) IS_LEFT_STEREO(x)
|
||||
|
||||
|
||||
typedef unsigned int Uint;
|
||||
typedef unsigned char Uchar;
|
||||
|
|
@ -321,6 +353,7 @@ struct disp_features {
|
|||
unsigned int input_voltage:2;
|
||||
unsigned int input_setup:1;
|
||||
unsigned int input_sync:5;
|
||||
unsigned int input_dfp:1;
|
||||
int hsize;
|
||||
int vsize;
|
||||
float gamma;
|
||||
|
|
@ -368,6 +401,7 @@ struct detailed_timings {
|
|||
unsigned int stereo:2;
|
||||
unsigned int sync:2;
|
||||
unsigned int misc:2;
|
||||
unsigned int stereo_1:1;
|
||||
};
|
||||
|
||||
#define DT 0
|
||||
|
|
@ -377,6 +411,7 @@ struct detailed_timings {
|
|||
#define DS_RANGES 0xFD
|
||||
#define DS_WHITE_P 0xFB
|
||||
#define DS_STD_TIMINGS 0xFA
|
||||
#define DS_DUMMY 0x10
|
||||
|
||||
struct monitor_ranges {
|
||||
int min_v;
|
||||
|
|
@ -384,6 +419,11 @@ struct monitor_ranges {
|
|||
int min_h;
|
||||
int max_h;
|
||||
int max_clock;
|
||||
int gtf_2nd_f;
|
||||
int gtf_2nd_c;
|
||||
int gtf_2nd_m;
|
||||
int gtf_2nd_k;
|
||||
int gtf_2nd_j;
|
||||
};
|
||||
|
||||
struct whitePoints{
|
||||
|
|
|
|||
|
|
@ -13,16 +13,21 @@
|
|||
|
||||
static void get_vendor_section(Uchar*, struct vendor *);
|
||||
static void get_version_section(Uchar*, struct edid_version *);
|
||||
static void get_display_section(Uchar*, struct disp_features *);
|
||||
static void get_display_section(Uchar*, struct disp_features *,
|
||||
struct edid_version *);
|
||||
static void get_established_timing_section(Uchar*, struct established_timings *);
|
||||
static void get_std_timing_section(Uchar*, struct std_timings *);
|
||||
static void get_std_timing_section(Uchar*, struct std_timings *,
|
||||
struct edid_version *);
|
||||
static void get_dt_md_section(Uchar *, struct edid_version *,
|
||||
struct detailed_monitor_section *det_mon);
|
||||
static void copy_string(Uchar *, Uchar *);
|
||||
static void get_dst_timing_section(Uchar *, struct std_timings *);
|
||||
static void get_dst_timing_section(Uchar *, struct std_timings *,
|
||||
struct edid_version *);
|
||||
static void get_monitor_ranges(Uchar *, struct monitor_ranges *);
|
||||
static void get_whitepoint_section(Uchar *, struct whitePoints *);
|
||||
static void get_detailed_timing_section(Uchar*, struct detailed_timings *);
|
||||
static Bool validate_version(int scrnIndex, struct edid_version *);
|
||||
|
||||
|
||||
xf86MonPtr
|
||||
xf86InterpretEDID(int scrnIndex, Uchar *block)
|
||||
|
|
@ -33,15 +38,24 @@ xf86InterpretEDID(int scrnIndex, Uchar *block)
|
|||
if (! (m = xnfcalloc(sizeof(xf86Monitor),1))) return NULL;
|
||||
m->scrnIndex = scrnIndex;
|
||||
m->rawData = block;
|
||||
|
||||
get_vendor_section(SECTION(VENDOR_SECTION,block),&m->vendor);
|
||||
get_version_section(SECTION(VERSION_SECTION,block),&m->ver);
|
||||
get_display_section(SECTION(DISPLAY_SECTION,block),&m->features);
|
||||
if (!validate_version(scrnIndex, &m->ver)) goto error;
|
||||
get_display_section(SECTION(DISPLAY_SECTION,block),&m->features,
|
||||
&m->ver);
|
||||
get_established_timing_section(SECTION(ESTABLISHED_TIMING_SECTION,block),
|
||||
&m->timings1);
|
||||
get_std_timing_section(SECTION(STD_TIMING_SECTION,block),m->timings2);
|
||||
get_std_timing_section(SECTION(STD_TIMING_SECTION,block),m->timings2,
|
||||
&m->ver);
|
||||
get_dt_md_section(SECTION(DET_TIMING_SECTION,block),&m->ver, m->det_mon);
|
||||
m->no_sections = (int)*(char *)SECTION(NO_EDID,block);
|
||||
|
||||
return (m);
|
||||
|
||||
error:
|
||||
xfree(m);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -66,12 +80,16 @@ get_version_section(Uchar *c, struct edid_version *r)
|
|||
}
|
||||
|
||||
static void
|
||||
get_display_section(Uchar *c, struct disp_features *r)
|
||||
get_display_section(Uchar *c, struct disp_features *r,
|
||||
struct edid_version *v)
|
||||
{
|
||||
r->input_type = INPUT_TYPE;
|
||||
r->input_voltage = INPUT_VOLTAGE;
|
||||
r->input_setup = SETUP;
|
||||
r->input_sync = SYNC;
|
||||
if (!DIGITAL(r->input_type)) {
|
||||
r->input_voltage = INPUT_VOLTAGE;
|
||||
r->input_setup = SETUP;
|
||||
r->input_sync = SYNC;
|
||||
} else if (v->version > 1 || v->revision > 2)
|
||||
r->input_dfp = DFP;
|
||||
r->hsize = HSIZE_MAX;
|
||||
r->vsize = VSIZE_MAX;
|
||||
r->gamma = GAMMA;
|
||||
|
|
@ -97,15 +115,20 @@ get_established_timing_section(Uchar *c, struct established_timings *r)
|
|||
}
|
||||
|
||||
static void
|
||||
get_std_timing_section(Uchar *c, struct std_timings *r)
|
||||
get_std_timing_section(Uchar *c, struct std_timings *r,
|
||||
struct edid_version *v)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0;i<STD_TIMINGS;i++){
|
||||
r[i].hsize = HSIZE1;
|
||||
VSIZE1(r[i].vsize);
|
||||
r[i].refresh = REFRESH_R;
|
||||
r[i].id = STD_TIMING_ID;
|
||||
if (VALID_TIMING) {
|
||||
r[i].hsize = HSIZE1;
|
||||
VSIZE1(r[i].vsize);
|
||||
r[i].refresh = REFRESH_R;
|
||||
r[i].id = STD_TIMING_ID;
|
||||
} else {
|
||||
r[i].hsize = r[i].vsize = r[i].refresh = r[i].id = 0;
|
||||
}
|
||||
NEXT_STD_TIMING;
|
||||
}
|
||||
}
|
||||
|
|
@ -142,8 +165,11 @@ get_dt_md_section(Uchar *c, struct edid_version *ver,
|
|||
break;
|
||||
case ADD_STD_TIMINGS:
|
||||
det_mon[i].type = DS_STD_TIMINGS;
|
||||
get_dst_timing_section(c,det_mon[i].section.std_t);
|
||||
get_dst_timing_section(c,det_mon[i].section.std_t, ver);
|
||||
break;
|
||||
case ADD_DUMMY:
|
||||
det_mon[i].type = DS_DUMMY;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
det_mon[i].type = DT;
|
||||
|
|
@ -165,7 +191,8 @@ copy_string(Uchar *c, Uchar *s)
|
|||
}
|
||||
|
||||
static void
|
||||
get_dst_timing_section(Uchar *c, struct std_timings *t)
|
||||
get_dst_timing_section(Uchar *c, struct std_timings *t,
|
||||
struct edid_version *v)
|
||||
{
|
||||
int j;
|
||||
c = c + 5;
|
||||
|
|
@ -188,6 +215,14 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r)
|
|||
r->max_clock = 0;
|
||||
if(MAX_CLOCK != 0xff) /* is specified? */
|
||||
r->max_clock = MAX_CLOCK * 10;
|
||||
if (HAVE_2ND_GTF) {
|
||||
r->gtf_2nd_f = F_2ND_GTF;
|
||||
r->gtf_2nd_c = C_2ND_GTF;
|
||||
r->gtf_2nd_m = M_2ND_GTF;
|
||||
r->gtf_2nd_k = K_2ND_GTF;
|
||||
r->gtf_2nd_j = J_2ND_GTF;
|
||||
} else
|
||||
r->gtf_2nd_f = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -221,8 +256,21 @@ get_detailed_timing_section(Uchar *c, struct detailed_timings *r)
|
|||
r->v_border = V_BORDER;
|
||||
r->interlaced = INTERLACED;
|
||||
r->stereo = STEREO;
|
||||
r->stereo_1 = STEREO1;
|
||||
r->sync = SYNC_T;
|
||||
r->misc = MISC;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
validate_version(int scrnIndex, struct edid_version *r)
|
||||
{
|
||||
if (r->version != 1)
|
||||
return FALSE;
|
||||
if (r->revision > 3) {
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,"EDID Version 1.%i not yet supported\n",
|
||||
r->revision);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
|
||||
static void print_vendor(int scrnIndex, struct vendor *);
|
||||
static void print_version(int scrnIndex, struct edid_version *);
|
||||
static void print_display(int scrnIndex, struct disp_features *);
|
||||
static void print_display(int scrnIndex, struct disp_features *,
|
||||
struct edid_version *);
|
||||
static void print_established_timings(int scrnIndex,
|
||||
struct established_timings *);
|
||||
static void print_std_timings(int scrnIndex, struct std_timings *);
|
||||
|
|
@ -21,19 +22,23 @@ static void print_detailed_monitor_section(int scrnIndex,
|
|||
static void print_detailed_timings(int scrnIndex, struct detailed_timings *);
|
||||
|
||||
static void print_input_features(int scrnIndex, struct disp_features *);
|
||||
static void print_dpms_features(int scrnIndex, struct disp_features *);
|
||||
static void print_dpms_features(int scrnIndex, struct disp_features *,
|
||||
struct edid_version *v);
|
||||
static void print_whitepoint(int scrnIndex, struct disp_features *);
|
||||
|
||||
static void print_number_sections(int scrnIndex, int);
|
||||
|
||||
xf86MonPtr
|
||||
xf86PrintEDID(xf86MonPtr m)
|
||||
{
|
||||
if (!(m)) return NULL;
|
||||
print_vendor(m->scrnIndex,&m->vendor);
|
||||
print_version(m->scrnIndex,&m->ver);
|
||||
print_display(m->scrnIndex,&m->features);
|
||||
print_display(m->scrnIndex,&m->features, &m->ver);
|
||||
print_established_timings(m->scrnIndex,&m->timings1);
|
||||
print_std_timings(m->scrnIndex,m->timings2);
|
||||
print_detailed_monitor_section(m->scrnIndex,m->det_mon);
|
||||
print_number_sections(m->scrnIndex,m->no_sections);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +58,8 @@ print_version(int scrnIndex, struct edid_version *c)
|
|||
}
|
||||
|
||||
static void
|
||||
print_display(int scrnIndex, struct disp_features *disp)
|
||||
print_display(int scrnIndex, struct disp_features *disp,
|
||||
struct edid_version *version)
|
||||
{
|
||||
print_input_features(scrnIndex,disp);
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Max H-Image Size [cm]: ");
|
||||
|
|
@ -66,16 +72,18 @@ print_display(int scrnIndex, struct disp_features *disp)
|
|||
else
|
||||
xf86ErrorF("V-Size may change\n");
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Gamma: %.2f\n", disp->gamma);
|
||||
print_dpms_features(scrnIndex,disp);
|
||||
print_dpms_features(scrnIndex,disp,version);
|
||||
print_whitepoint(scrnIndex,disp);
|
||||
}
|
||||
|
||||
static void
|
||||
print_input_features(int scrnIndex, struct disp_features *c)
|
||||
{
|
||||
if (DIGITAL(c->input_type))
|
||||
if (DIGITAL(c->input_type)) {
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Digital Display Input\n");
|
||||
else {
|
||||
if (DFP1(c->input_dfp))
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"DFP 1.x compatible TMDS\n");
|
||||
} else {
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Analog Display Input, ");
|
||||
xf86ErrorF("Input Voltage Level: ");
|
||||
switch (c->input_voltage){
|
||||
|
|
@ -111,7 +119,8 @@ print_input_features(int scrnIndex, struct disp_features *c)
|
|||
}
|
||||
|
||||
static void
|
||||
print_dpms_features(int scrnIndex, struct disp_features *c)
|
||||
print_dpms_features(int scrnIndex, struct disp_features *c,
|
||||
struct edid_version *v)
|
||||
{
|
||||
if (c->dpms) {
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"DPMS capabilities:");
|
||||
|
|
@ -140,6 +149,10 @@ print_dpms_features(int scrnIndex, struct disp_features *c)
|
|||
if (PREFERRED_TIMING_MODE(c->msc))
|
||||
xf86DrvMsg(scrnIndex,X_INFO,
|
||||
"First detailed timing is preferred mode\n");
|
||||
else if (v->version == 1 && v->revision >= 3)
|
||||
xf86DrvMsg(scrnIndex,X_INFO,
|
||||
"First detailed timing not preferred "
|
||||
"mode in violation of standard!");
|
||||
if (GFT_SUPPORTED(c->msc))
|
||||
xf86DrvMsg(scrnIndex,X_INFO,
|
||||
"GTF timings supported\n");
|
||||
|
|
@ -234,7 +247,15 @@ print_detailed_monitor_section(int scrnIndex,
|
|||
if (m[i].section.ranges.max_clock != 0)
|
||||
xf86ErrorF(" PixClock max %i MHz\n",m[i].section.ranges.max_clock);
|
||||
else
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"\n");
|
||||
xf86ErrorF("\n");
|
||||
if (m[i].section.ranges.gtf_2nd_f > 0)
|
||||
xf86DrvMsg(scrnIndex,X_INFO," 2nd GTF parameters: f: %i kHz "
|
||||
"c: %i m: %i k %i j %i\n",
|
||||
m[i].section.ranges.gtf_2nd_f,
|
||||
m[i].section.ranges.gtf_2nd_c,
|
||||
m[i].section.ranges.gtf_2nd_m,
|
||||
m[i].section.ranges.gtf_2nd_k,
|
||||
m[i].section.ranges.gtf_2nd_j);
|
||||
break;
|
||||
case DS_STD_TIMINGS:
|
||||
for (j = 0; j<5; j++)
|
||||
|
|
@ -252,6 +273,9 @@ print_detailed_monitor_section(int scrnIndex,
|
|||
m[i].section.wp[j].white_y,
|
||||
m[i].section.wp[j].white_gamma);
|
||||
break;
|
||||
case DS_DUMMY:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -278,9 +302,32 @@ print_detailed_timings(int scrnIndex, struct detailed_timings *t)
|
|||
xf86ErrorF("v_border: %i\n",t->v_border);
|
||||
if (IS_STEREO(t->stereo)) {
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Stereo: ");
|
||||
if (IS_RIGHT_ON_SYNC(t->stereo))
|
||||
xf86ErrorF("right channel on sync\n");
|
||||
else xf86ErrorF("right channel on sync\n");
|
||||
if (IS_RIGHT_STEREO(t->stereo)) {
|
||||
if (!t->stereo_1)
|
||||
xf86ErrorF("right channel on sync\n");
|
||||
else
|
||||
xf86ErrorF("left channel on sync\n");
|
||||
} else if (IS_LEFT_STEREO(t->stereo)) {
|
||||
if (!t->stereo_1)
|
||||
xf86ErrorF("right channel on even line\n");
|
||||
else
|
||||
xf86ErrorF("left channel on evel line\n");
|
||||
}
|
||||
if (IS_4WAY_STEREO(t->stereo)) {
|
||||
if (!t->stereo_1)
|
||||
xf86ErrorF("4-way interleaved\n");
|
||||
else
|
||||
xf86ErrorF("side-by-side interleaved");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_number_sections(int scrnIndex, int num)
|
||||
{
|
||||
if (num)
|
||||
xf86DrvMsg(scrnIndex,X_INFO,"Number of EDID sections to follow: %i\n",
|
||||
num);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ or other dealings in this Software without prior written authorization
|
|||
from Kaleb S. KEITHLEY
|
||||
|
||||
*/
|
||||
/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.2 2004/04/23 18:44:41 eich Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */
|
||||
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
|
||||
|
||||
|
|
@ -52,6 +52,8 @@ from Kaleb S. KEITHLEY
|
|||
#include "xf86_ansic.h"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
|
||||
|
||||
static int VidModeErrorBase;
|
||||
static int VidModeGeneration = 0;
|
||||
static int VidModeClientPrivateIndex;
|
||||
|
|
@ -468,7 +470,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
|
|||
rep.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL);
|
||||
rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
|
||||
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("GetModeLine - scrn: %d clock: %ld\n",
|
||||
stuff->screen, (unsigned long)rep.dotclock);
|
||||
ErrorF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -676,7 +678,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
|
|||
stuff->after_vtotal = oldstuff->after_vtotal;
|
||||
stuff->after_flags = oldstuff->after_flags;
|
||||
}
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("AddModeLine - scrn: %d clock: %ld\n",
|
||||
(int)stuff->screen, (unsigned long)stuff->dotclock);
|
||||
ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -787,7 +789,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
|
|||
|
||||
VidModeAddModeline(stuff->screen, mode);
|
||||
|
||||
if (xf86GetVerbosity() > 1)
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
ErrorF("AddModeLine - Succeeded\n");
|
||||
return client->noClientException;
|
||||
}
|
||||
|
|
@ -824,7 +826,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
|
|||
stuff->flags = oldstuff->flags;
|
||||
stuff->privsize = oldstuff->privsize;
|
||||
}
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("DeleteModeLine - scrn: %d clock: %ld\n",
|
||||
(int)stuff->screen, (unsigned long)stuff->dotclock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -843,7 +845,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
|
|||
len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2);
|
||||
}
|
||||
if (len != stuff->privsize) {
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, "
|
||||
"len = %d, length = %d\n",
|
||||
(unsigned long)client->req_len,
|
||||
|
|
@ -859,7 +861,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
|
|||
if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock))
|
||||
return BadValue;
|
||||
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("Checking against clock: %d (%d)\n",
|
||||
VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -882,7 +884,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
|
|||
return BadValue;
|
||||
|
||||
do {
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("Checking against clock: %d (%d)\n",
|
||||
VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -900,7 +902,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
|
|||
if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) &&
|
||||
MODEMATCH(mode, stuff)) {
|
||||
VidModeDeleteModeline(stuff->screen, mode);
|
||||
if (xf86GetVerbosity())
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
ErrorF("DeleteModeLine - Succeeded\n");
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
@ -940,7 +942,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
|
|||
stuff->flags = oldstuff->flags;
|
||||
stuff->privsize = oldstuff->privsize;
|
||||
}
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
(int)stuff->screen, stuff->hdisplay, stuff->hsyncstart,
|
||||
stuff->hsyncend, stuff->htotal);
|
||||
|
|
@ -1028,7 +1030,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
|
|||
VidModeSetCrtcForMode(stuff->screen, mode);
|
||||
VidModeSwitchMode(stuff->screen, mode);
|
||||
|
||||
if (xf86GetVerbosity() > 1)
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
ErrorF("ModModeLine - Succeeded\n");
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
@ -1066,7 +1068,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
|
|||
stuff->flags = oldstuff->flags;
|
||||
stuff->privsize = oldstuff->privsize;
|
||||
}
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("ValidateModeLine - scrn: %d clock: %ld\n",
|
||||
(int)stuff->screen, (unsigned long)stuff->dotclock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -1146,7 +1148,7 @@ status_reply:
|
|||
swapl(&rep.status, n);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
|
||||
if (xf86GetVerbosity() > 1)
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status);
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
@ -1200,7 +1202,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
|
|||
stuff->flags = oldstuff->flags;
|
||||
stuff->privsize = oldstuff->privsize;
|
||||
}
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("SwitchToMode - scrn: %d clock: %ld\n",
|
||||
(int)stuff->screen, (unsigned long)stuff->dotclock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -1235,7 +1237,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
|
|||
return BadValue;
|
||||
|
||||
do {
|
||||
if (xf86GetVerbosity() > 1) {
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
|
||||
ErrorF("Checking against clock: %d (%d)\n",
|
||||
VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
|
||||
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
|
||||
|
|
@ -1256,7 +1258,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
|
|||
if (!VidModeSwitchMode(stuff->screen, mode))
|
||||
return BadValue;
|
||||
|
||||
if (xf86GetVerbosity() > 1)
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
ErrorF("SwitchToMode - Succeeded\n");
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Fonts in X11R6.8.1
|
||||
Fonts in X11R6.8.2
|
||||
|
||||
Juliusz Chroboczek, <jch@pps.jussieu.fr>
|
||||
|
||||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
1. Introduction
|
||||
|
||||
This document describes the support for fonts in X11R6.8.1. Installing fonts
|
||||
This document describes the support for fonts in X11R6.8.2. Installing fonts
|
||||
(section 2., page 1) is aimed at the casual user wishing to install fonts in
|
||||
X11R6.8.1 the rest of the document describes the font support in more detail.
|
||||
X11R6.8.2 the rest of the document describes the font support in more detail.
|
||||
|
||||
We assume some familiarity with digital fonts. If anything is not clear to
|
||||
you, please consult Appendix: Background (section 5., page 1) at the end of
|
||||
|
|
@ -19,7 +19,7 @@ this document for background information.
|
|||
X includes two font systems: the original core X11 fonts system, which is
|
||||
present in all implementations of X11, and the Xft fonts system, which may
|
||||
not be distributed with implementations of X11 that are not based on
|
||||
X11R6.8.1 but will hopefully be included by them in the future
|
||||
X11R6.8.2 but will hopefully be included by them in the future
|
||||
|
||||
The core X11 fonts system is directly derived from the fonts system included
|
||||
with X11R1 in 1987, which could only use monochrome bitmap fonts. Over the
|
||||
|
|
@ -48,13 +48,13 @@ access newly-installed fonts.
|
|||
|
||||
Xft has no configuration mechanism itself, rather it relies upon the fontcon-
|
||||
fig library to configure and customize fonts. That library is not specific
|
||||
to X11R6.8.1 or indeed on any particular font output mechanism. This discus-
|
||||
to X11R6.8.2 or indeed on any particular font output mechanism. This discus-
|
||||
sion describes how fontconfig, rather than Xft, works.
|
||||
|
||||
2.1.1 Installing fonts in Xft
|
||||
|
||||
Fontconfig looks for fonts in a set of well-known directories that include
|
||||
all of X11R6.8.1's standard font directories
|
||||
all of X11R6.8.2's standard font directories
|
||||
(`/usr/X11R6/lib/X11/lib/fonts/*') by default) as well as a directory called
|
||||
`.fonts/' in the user's home directory. Installing a font for use by Xft
|
||||
applications is as simple as copying a font file into one of these directo-
|
||||
|
|
@ -115,7 +115,7 @@ Anti-aliasing can be disabled for all fonts by the following incantation:
|
|||
</edit>
|
||||
</match>
|
||||
|
||||
Xft supports sub-pixel rasterisation on LCD displays. X11R6.8.1 should auto-
|
||||
Xft supports sub-pixel rasterisation on LCD displays. X11R6.8.2 should auto-
|
||||
matically enable this feature on laptops and when using an LCD monitor con-
|
||||
nected with a DVI cable; you can check whether this was done by typing
|
||||
|
||||
|
|
@ -186,8 +186,8 @@ of this new directory by including it in the font path.
|
|||
|
||||
2.2.1 Installing bitmap fonts
|
||||
|
||||
The X11R6.8.1 server can use bitmap fonts in both the cross-platform BDF for-
|
||||
mat and the somewhat more efficient binary PCF format. (X11R6.8.1 also sup-
|
||||
The X11R6.8.2 server can use bitmap fonts in both the cross-platform BDF for-
|
||||
mat and the somewhat more efficient binary PCF format. (X11R6.8.2 also sup-
|
||||
ports the obsolete SNF format.)
|
||||
|
||||
Bitmap fonts are normally distributed in the BDF format. Before installing
|
||||
|
|
@ -216,7 +216,7 @@ directory; see Setting the server font path (section 2.2.4, page 1) below.
|
|||
|
||||
2.2.2 Installing scalable fonts
|
||||
|
||||
The X11R6.8.1 server supports scalable fonts in four formats: Type 1, Speedo,
|
||||
The X11R6.8.2 server supports scalable fonts in four formats: Type 1, Speedo,
|
||||
TrueType and CIDFont. This section only applies to the former three; for
|
||||
information on CIDFonts, please see Installing CIDFonts (section 2.2.3, page
|
||||
1) later in this document.
|
||||
|
|
@ -252,7 +252,7 @@ CMap `UniKS-UCS2-H' is called
|
|||
|
||||
Munhwa-Regular--UniKS-UCS2-H
|
||||
|
||||
The CIDFont code in X11R6.8.1 requires a very rigid directory structure. The
|
||||
The CIDFont code in X11R6.8.2 requires a very rigid directory structure. The
|
||||
main directory must be called `CID' (its location defaults to
|
||||
`/usr/X11R6/lib/X11/fonts/CID' but it may be located anywhere), and it should
|
||||
contain a subdirectory for every CID collection. Every subdirectory must
|
||||
|
|
@ -311,7 +311,7 @@ For best results, scalable fonts should appear in the font path before the
|
|||
bitmap fonts; this way, the server will prefer bitmap fonts to scalable fonts
|
||||
when an exact match is possible, but will avoid scaling bitmap fonts when a
|
||||
scalable font can be used. (The `:unscaled' hack, while still supported,
|
||||
should no longer be necessary in X11R6.8.1.)
|
||||
should no longer be necessary in X11R6.8.2.)
|
||||
|
||||
You may check the font path of the running server by typing the command
|
||||
|
||||
|
|
@ -354,11 +354,11 @@ mounted font directories). If this doesn't help, it is quite possible that
|
|||
you are trying to use a font in a format that is not supported by your
|
||||
server.
|
||||
|
||||
X11R6.8.1 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
|
||||
CIDFont font formats. However, not all X11R6.8.1 servers come with all the
|
||||
X11R6.8.2 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
|
||||
CIDFont font formats. However, not all X11R6.8.2 servers come with all the
|
||||
font backends configured in.
|
||||
|
||||
On most platforms, the X11R6.8.1 servers are modular: the font backends are
|
||||
On most platforms, the X11R6.8.2 servers are modular: the font backends are
|
||||
included in modules that are loaded at runtime. The modules to be loaded are
|
||||
specified in the `xorg.conf' file using the `Load' directive:
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ specified in the `xorg.conf' file using the `Load' directive:
|
|||
|
||||
If you have trouble installing fonts in a specific format, you may want to
|
||||
check the server's log file in order to see whether the relevant modules are
|
||||
properly loaded. The list of font modules distributed with X11R6.8.1 is as
|
||||
properly loaded. The list of font modules distributed with X11R6.8.2 is as
|
||||
follows:
|
||||
|
||||
o "bitmap": bitmap fonts (`*.bdf', `*.pcf' and `*.snf');
|
||||
|
|
@ -383,7 +383,7 @@ follows:
|
|||
|
||||
Please note that the argument of the `Load' directive is case-sensitive.
|
||||
|
||||
3. Fonts included with X11R6.8.1
|
||||
3. Fonts included with X11R6.8.2
|
||||
|
||||
3.1 Standard bitmap fonts
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ fonts, including the `fixed' family, and bitmap versions of Courier, Times,
|
|||
Helvetica and some members of the Lucida family. In the SI, these fonts are
|
||||
provided in the ISO 8859-1 encoding (ISO Latin Western-European).
|
||||
|
||||
In X11R6.8.1, a number of these fonts are provided in Unicode-encoded font
|
||||
In X11R6.8.2, a number of these fonts are provided in Unicode-encoded font
|
||||
files instead. At build time, these fonts are split into font files encoded
|
||||
according to legacy encodings, a process which allows us to provide the stan-
|
||||
dard fonts in a number of regional encodings with no duplication of work.
|
||||
|
|
@ -470,7 +470,7 @@ for improved presentation of text.
|
|||
|
||||
3.3 Standard scalable fonts
|
||||
|
||||
X11R6.8.1 includes all the scalable fonts distributed with X11R6.
|
||||
X11R6.8.2 includes all the scalable fonts distributed with X11R6.
|
||||
|
||||
3.3.1 Standard Type 1 fonts
|
||||
|
||||
|
|
@ -492,7 +492,7 @@ and reside in the font files
|
|||
|
||||
/usr/X11R6/lib/X11/fonts/Type1/UT*.pfa
|
||||
|
||||
Finally, X11R6.8.1 also comes with Type 1 versions of Bitstream Courier and
|
||||
Finally, X11R6.8.2 also comes with Type 1 versions of Bitstream Courier and
|
||||
Charter. These fonts have XLFD
|
||||
|
||||
-bitstream-courier-*-*-normal--0-0-0-0-m-0-iso8859-1
|
||||
|
|
@ -504,7 +504,7 @@ and reside in the font files
|
|||
|
||||
3.3.2 Standard Speedo fonts
|
||||
|
||||
X11R6.8.1 includes Speedo versions of the Bitstream Courier and Charter
|
||||
X11R6.8.2 includes Speedo versions of the Bitstream Courier and Charter
|
||||
fonts. In order to use these fonts, you should ensure that your X server is
|
||||
loading the `Speedo' font backend; see Troubleshooting (section 2.2.5, page
|
||||
1).
|
||||
|
|
@ -521,7 +521,7 @@ and reside in the font files
|
|||
|
||||
3.4 The Bigelow & Holmes Luxi family
|
||||
|
||||
X11R6.8.1 includes the Luxi family of scalable fonts, in both TrueType and
|
||||
X11R6.8.2 includes the Luxi family of scalable fonts, in both TrueType and
|
||||
Type 1 format. This family consists of the fonts Luxi Serif, with XLFD
|
||||
|
||||
-b&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-*
|
||||
|
|
@ -567,11 +567,11 @@ For more information, please contact <design@bigelowandholmes.com> or
|
|||
|
||||
An earlier version of the Luxi fonts was made available under the name
|
||||
Lucidux. This name should no longer be used due to trademark uncertainties,
|
||||
and all traces of the Lucidux name have been removed from X11R6.8.1.
|
||||
and all traces of the Lucidux name have been removed from X11R6.8.2.
|
||||
|
||||
4. More about core fonts
|
||||
|
||||
This section describes X11R6.8.1-specific enhancements to the core X11 fonts
|
||||
This section describes X11R6.8.2-specific enhancements to the core X11 fonts
|
||||
system.
|
||||
|
||||
4.1 Core fonts and internationalisation
|
||||
|
|
@ -594,7 +594,7 @@ backend) use a common fontenc layer for font re-encoding. This allows these
|
|||
backends to share their encoding data, and allows simple configuration of new
|
||||
locales independently of font type.
|
||||
|
||||
Please note: the X-TrueType (X-TT) backend is not included in X11R6.8.1.
|
||||
Please note: the X-TrueType (X-TT) backend is not included in X11R6.8.2.
|
||||
That functionality has been merged into the FreeType backend.>
|
||||
|
||||
In the fontenc layer, an encoding is defined by a name (such as iso8859-1),
|
||||
|
|
@ -654,7 +654,7 @@ option followed by the name of a directory containing encoding files, can be
|
|||
used to automatically build `encodings.dir' files. Please see the mkfont-
|
||||
dir(1) manual page for more details.
|
||||
|
||||
A number of encoding files for common encodings are included with X11R6.8.1.
|
||||
A number of encoding files for common encodings are included with X11R6.8.2.
|
||||
Information on writing new encoding files can be found in Format of encodings
|
||||
directory files (section 4.1.3, page 1) and Format of encoding files (section
|
||||
4.1.4, page 1) later in this document.
|
||||
|
|
@ -974,8 +974,8 @@ options are indispensable in CJKV. For example,
|
|||
bw=0.5:ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0201.1976-0
|
||||
|
||||
setup the complete combination of jisx0208 and jisx0201 using mincho.ttc
|
||||
only. More information on the TTCap syntax is found on the After X-TT Pro-
|
||||
ject page <URL:http://x-tt.sourceforge.jp/>.
|
||||
only. More information on the TTCap syntax is found on the After X-TT
|
||||
Project page <URL:http://x-tt.sourceforge.jp/>.
|
||||
|
||||
The FreeType backend uses the fontenc layer in order to support recoding of
|
||||
fonts; this was described in The fontenc layer (section 4.1.1, page 1) and
|
||||
|
|
@ -990,7 +990,7 @@ ings, but instead uses its own database of encodings.
|
|||
|
||||
Since the functionalities for CJKV support introduced by X-TT have been
|
||||
merged into the new FreeType backend, the X-TT backend will be removed from
|
||||
X11R6.8.1's tree near the future. Therefore, the use of FreeType backend is
|
||||
X11R6.8.2's tree near the future. Therefore, the use of FreeType backend is
|
||||
preferred over the X-TT backend.
|
||||
|
||||
General information on X-TrueType may be found at the After X-TT Project page
|
||||
|
|
@ -1137,15 +1137,15 @@ last two fields of their XLFD set to `iso10646-1'.
|
|||
|
||||
6. References
|
||||
|
||||
X11R6.8.1 comes with extensive documentation in the form of manual pages and
|
||||
X11R6.8.2 comes with extensive documentation in the form of manual pages and
|
||||
typeset documents. Before installing fonts, you really should read the font-
|
||||
config(3) and mkfontdir(1) manual pages; other manual pages of interest
|
||||
include X(7), Xserver(1), xset(1), Xft(3), xlsfonts(1) and showfont(1). In
|
||||
addition, you may want to read the X Logical Font Description document, by
|
||||
Jim Flowers, which is provided in the file `xc/doc/xlfd.PS.Z'.
|
||||
|
||||
The latest released version of the X11R6.8.1 documentation (including this
|
||||
document and all manual pages) can be found from current X11R6.8.1 documenta-
|
||||
The latest released version of the X11R6.8.2 documentation (including this
|
||||
document and all manual pages) can be found from current X11R6.8.2 documenta-
|
||||
tion <URL:http://wiki.x.org/>.
|
||||
|
||||
The comp.fonts FAQ <URL:http://www.netmeg.net/faq/computers/fonts/>, which is
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
extern Bool noPanoramiXExtension;
|
||||
#endif
|
||||
|
||||
extern Bool noXFree86DRIExtension;
|
||||
|
||||
static int DRIScreenPrivIndex = -1;
|
||||
static int DRIWindowPrivIndex = -1;
|
||||
static unsigned long DRIGeneration = 0;
|
||||
|
|
@ -129,6 +131,13 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
|
|||
DRIGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
/* If the DRI extension is disabled, do not initialize the DRI */
|
||||
if (noXFree86DRIExtension) {
|
||||
DRIDrvMsg(pScreen->myNum, X_WARNING,
|
||||
"Direct rendering has been disabled.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If Xinerama is on, don't allow DRI to initialise. It won't be usable
|
||||
* anyway.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.5 2004/08/19 04:08:40 kem Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
|
||||
* 17:11:29 tsi Exp $ */
|
||||
|
||||
|
|
@ -325,15 +325,122 @@ LOOKUP dixLookupTab[] = {
|
|||
SYMFUNC(AdjustWaitForDelay)
|
||||
SYMVAR(noTestExtensions)
|
||||
SYMFUNC(GiveUp)
|
||||
|
||||
#ifdef BEZIER
|
||||
SYMVAR(noBezierExtension)
|
||||
#endif
|
||||
#ifdef BIGREQS
|
||||
SYMVAR(noBigReqExtension)
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
SYMVAR(noCompositeExtension)
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
SYMVAR(noDamageExtension)
|
||||
#endif
|
||||
#ifdef DBE
|
||||
SYMVAR(noDbeExtension)
|
||||
#endif
|
||||
#ifdef DPSEXT
|
||||
SYMVAR(noDPSExtension)
|
||||
#endif
|
||||
#ifdef DPMSExtension
|
||||
SYMVAR(noDPMSExtension)
|
||||
#endif
|
||||
#ifdef EVI
|
||||
SYMVAR(noEVIExtension)
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
SYMVAR(noFontCacheExtension)
|
||||
#endif
|
||||
#ifdef GLXEXT
|
||||
SYMVAR(noGlxExtension)
|
||||
#endif
|
||||
#ifdef LBX
|
||||
SYMVAR(noLbxExtension)
|
||||
#endif
|
||||
#ifdef SCREENSAVER
|
||||
SYMVAR(noScreenSaverExtension)
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
SYMVAR(noMITShmExtension)
|
||||
#endif
|
||||
#ifdef MITMISC
|
||||
SYMVAR(noMITMiscExtension)
|
||||
#endif
|
||||
#ifdef MULTIBUFFER
|
||||
SYMVAR(noMultibufferExtension)
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
SYMVAR(noRRExtension)
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
SYMVAR(noRenderExtension)
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
SYMVAR(noShapeExtension)
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
SYMVAR(noSecurityExtension)
|
||||
#endif
|
||||
#ifdef XSYNC
|
||||
SYMVAR(noSyncExtension)
|
||||
#endif
|
||||
#ifdef TOGCUP
|
||||
SYMVAR(noXcupExtension)
|
||||
#endif
|
||||
#ifdef PEXEXT
|
||||
SYMVAR(noPexExtension)
|
||||
#endif
|
||||
#ifdef RES
|
||||
SYMVAR(noResExtension)
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
SYMVAR(noXagExtension)
|
||||
#endif
|
||||
#ifdef XCMISC
|
||||
SYMVAR(noXCMiscExtension)
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
SYMVAR(noXevieExtension)
|
||||
#endif
|
||||
#ifdef XIE
|
||||
SYMVAR(noXie)
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
SYMVAR(noXFree86BigfontExtension)
|
||||
#endif
|
||||
#ifdef XFreeXDGA
|
||||
SYMVAR(noXFree86DGAExtension)
|
||||
#endif
|
||||
#ifdef XF86DRI
|
||||
SYMVAR(noXFree86DRIExtension)
|
||||
#endif
|
||||
#ifdef XF86MISC
|
||||
SYMVAR(noXFree86MiscExtension)
|
||||
#endif
|
||||
#ifdef XF86VIDMODE
|
||||
SYMVAR(noXFree86VidModeExtension)
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
SYMVAR(noXFixesExtension)
|
||||
#endif
|
||||
#ifdef XKB
|
||||
/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
|
||||
SYMVAR(noXkbExtension)
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
SYMVAR(noPanoramiXExtension)
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
SYMVAR(noXInputExtension)
|
||||
#endif
|
||||
#ifdef XIDLE
|
||||
SYMVAR(noXIdleExtension)
|
||||
#endif
|
||||
#ifdef XV
|
||||
SYMVAR(noXvExtension)
|
||||
#endif
|
||||
|
||||
/* log.c */
|
||||
SYMFUNC(LogVWrite)
|
||||
|
|
@ -386,7 +493,6 @@ LOOKUP dixLookupTab[] = {
|
|||
/* xkb/xkbInit.c */
|
||||
SYMFUNC(XkbInitKeyboardDeviceStruct)
|
||||
SYMFUNC(XkbSetRulesDflts)
|
||||
SYMVAR(noXkbExtension)
|
||||
#endif
|
||||
|
||||
#ifdef XINPUT
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */
|
||||
|
||||
/*
|
||||
|
|
@ -922,7 +922,7 @@ ELFCreateGOT(ELFModulePtr elffile, int maxalign)
|
|||
ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
|
||||
return FALSE;
|
||||
}
|
||||
# if defined(linux) || defined(__OpenBSD__)
|
||||
# if defined(linux) || defined(__OpenBSD__) || defined(sun)
|
||||
{
|
||||
unsigned long page_size = getpagesize();
|
||||
unsigned long round;
|
||||
|
|
@ -1097,7 +1097,7 @@ ELFCreatePLT(ELFModulePtr elffile)
|
|||
ErrorF("ELFCreatePLT() Unable to allocate memory!!!!\n");
|
||||
return;
|
||||
}
|
||||
# if defined(linux) || defined(__OpenBSD__)
|
||||
# if defined(linux) || defined(__OpenBSD__) || defined(sun)
|
||||
{
|
||||
unsigned long page_size = getpagesize();
|
||||
unsigned long round;
|
||||
|
|
@ -2775,7 +2775,7 @@ ELFCollectSections(ELFModulePtr elffile, int pass, int *totalsize,
|
|||
elffile->lsection[j].size = SecSize(i);
|
||||
elffile->lsection[j].flags = flags;
|
||||
switch (SecType(i)) {
|
||||
#if defined(linux) || defined(__OpenBSD__)
|
||||
#if defined(linux) || defined(__OpenBSD__) || defined(sun)
|
||||
case SHT_PROGBITS:
|
||||
{
|
||||
unsigned long page_size = getpagesize();
|
||||
|
|
@ -2979,7 +2979,7 @@ ELFLoadModule(loaderPtr modrec, int elffd, LOOKUP **ppLookup)
|
|||
ErrorF("Unable to allocate ELF sections\n");
|
||||
return NULL;
|
||||
}
|
||||
# if defined(linux) || defined(__OpenBSD__)
|
||||
# if defined(linux) || defined(__OpenBSD__) || defined(sun)
|
||||
{
|
||||
unsigned long page_size = getpagesize();
|
||||
unsigned long round;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4 2004/08/09 03:40:50 krh Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
|
||||
|
||||
/*
|
||||
|
|
@ -66,7 +66,6 @@ LOOKUP extLookupTab[] = {
|
|||
#ifdef PANORAMIX
|
||||
SYMFUNC(XineramaRegisterConnectionBlockCallback)
|
||||
SYMFUNC(XineramaDeleteResource)
|
||||
SYMVAR(noPanoramiXExtension)
|
||||
SYMVAR(PanoramiXNumScreens)
|
||||
SYMVAR(panoramiXdataPtr)
|
||||
SYMVAR(PanoramiXVisualTable)
|
||||
|
|
|
|||
|
|
@ -677,11 +677,11 @@ TransMapRec wsAdb = {
|
|||
};
|
||||
|
||||
static CARD8 wsSunMap[] = {
|
||||
/* 0x00 */ KEY_NOTUSED,
|
||||
/* 0x01 */ KEY_NOTUSED, /* stop */
|
||||
/* 0x02 */ KEY_NOTUSED, /* BrightnessDown / S-VolumeDown */
|
||||
/* 0x03 */ KEY_NOTUSED, /* again */
|
||||
/* 0x04 */ KEY_NOTUSED, /* BridgtnessUp / S-VolumeUp */
|
||||
/* 0x00 */ KEY_Help,
|
||||
/* 0x01 */ KEY_L1, /* stop */
|
||||
/* 0x02 */ KEY_AudioLower, /* BrightnessDown / S-VolumeDown */
|
||||
/* 0x03 */ KEY_L2, /* again */
|
||||
/* 0x04 */ KEY_AudioRaise, /* BridgtnessUp / S-VolumeUp */
|
||||
/* 0x05 */ KEY_F1,
|
||||
/* 0x06 */ KEY_F2,
|
||||
/* 0x07 */ KEY_F10,
|
||||
|
|
@ -700,10 +700,10 @@ static CARD8 wsSunMap[] = {
|
|||
/* 0x14 */ KEY_Up,
|
||||
/* 0x15 */ KEY_Pause,
|
||||
/* 0x16 */ KEY_Print,
|
||||
/* 0x17 */ KEY_NOTUSED, /* props */
|
||||
/* 0x17 */ KEY_ScrollLock,
|
||||
/* 0x18 */ KEY_Left,
|
||||
/* 0x19 */ KEY_ScrollLock,
|
||||
/* 0x1a */ KEY_NOTUSED, /* undo */
|
||||
/* 0x19 */ KEY_L3, /* props */
|
||||
/* 0x1a */ KEY_L4, /* undo */
|
||||
/* 0x1b */ KEY_Down,
|
||||
/* 0x1c */ KEY_Right,
|
||||
/* 0x1d */ KEY_Escape,
|
||||
|
|
@ -722,13 +722,13 @@ static CARD8 wsSunMap[] = {
|
|||
/* 0x2a */ KEY_Tilde,
|
||||
/* 0x2b */ KEY_BackSpace,
|
||||
/* 0x2c */ KEY_Insert,
|
||||
/* 0x2d */ KEY_KP_Equal,
|
||||
/* 0x2d */ KEY_Mute, /* Audio Mute */
|
||||
/* 0x2e */ KEY_KP_Divide,
|
||||
/* 0x2f */ KEY_KP_Multiply,
|
||||
/* 0x30 */ KEY_NOTUSED,
|
||||
/* 0x31 */ KEY_NOTUSED, /* front */
|
||||
/* 0x31 */ KEY_L5, /* front */
|
||||
/* 0x32 */ KEY_KP_Decimal,
|
||||
/* 0x33 */ KEY_NOTUSED, /* copy */
|
||||
/* 0x33 */ KEY_L6, /* copy */
|
||||
/* 0x34 */ KEY_Home,
|
||||
/* 0x35 */ KEY_Tab,
|
||||
/* 0x36 */ KEY_Q,
|
||||
|
|
@ -744,13 +744,13 @@ static CARD8 wsSunMap[] = {
|
|||
/* 0x40 */ KEY_LBrace,
|
||||
/* 0x41 */ KEY_RBrace,
|
||||
/* 0x42 */ KEY_Delete,
|
||||
/* 0x43 */ KEY_NOTUSED, /* compose */
|
||||
/* 0x43 */ KEY_Menu, /* compose */
|
||||
/* 0x44 */ KEY_KP_7,
|
||||
/* 0x45 */ KEY_KP_8,
|
||||
/* 0x46 */ KEY_KP_9,
|
||||
/* 0x47 */ KEY_KP_Minus,
|
||||
/* 0x48 */ KEY_NOTUSED, /* open */
|
||||
/* 0x49 */ KEY_NOTUSED, /* paste */
|
||||
/* 0x48 */ KEY_L7, /* open */
|
||||
/* 0x49 */ KEY_L8, /* paste */
|
||||
/* 0x4a */ KEY_End,
|
||||
/* 0x4b */ KEY_NOTUSED,
|
||||
/* 0x4c */ KEY_LCtrl,
|
||||
|
|
@ -772,9 +772,9 @@ static CARD8 wsSunMap[] = {
|
|||
/* 0x5c */ KEY_KP_5,
|
||||
/* 0x5d */ KEY_KP_6,
|
||||
/* 0x5e */ KEY_KP_0,
|
||||
/* 0x5f */ KEY_NOTUSED, /* find */
|
||||
/* 0x5f */ KEY_L9, /* find */
|
||||
/* 0x60 */ KEY_PgUp,
|
||||
/* 0x61 */ KEY_NOTUSED, /* cut */
|
||||
/* 0x61 */ KEY_L10, /* cut */
|
||||
/* 0x62 */ KEY_NumLock,
|
||||
/* 0x63 */ KEY_ShiftL,
|
||||
/* 0x64 */ KEY_Z,
|
||||
|
|
@ -801,7 +801,7 @@ static CARD8 wsSunMap[] = {
|
|||
/* 0x79 */ KEY_Space,
|
||||
/* 0x7a */ KEY_RMeta,
|
||||
/* 0x7b */ KEY_PgDown,
|
||||
/* 0x7c */ KEY_NOTUSED,
|
||||
/* 0x7c */ KEY_Less, /* < > on some keyboards */
|
||||
/* 0x7d */ KEY_KP_Plus,
|
||||
/* 0x7e */ KEY_NOTUSED,
|
||||
/* 0x7f */ KEY_NOTUSED
|
||||
|
|
@ -1044,9 +1044,11 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
|||
case PCCONS:
|
||||
case PCVT:
|
||||
pKbd->RemapScanCode = ATScancode;
|
||||
break;
|
||||
#endif
|
||||
#ifdef WSCONS_SUPPORT
|
||||
case WSCONS:
|
||||
if (!pKbd->isConsole) {
|
||||
switch (pKbd->wsKbdType) {
|
||||
case WSKBD_TYPE_PC_XT:
|
||||
case WSKBD_TYPE_PC_AT:
|
||||
|
|
@ -1061,6 +1063,9 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
|||
break;
|
||||
#endif
|
||||
#ifdef WSKBD_TYPE_SUN
|
||||
#ifdef WSKBD_TYPE_SUN5
|
||||
case WSKBD_TYPE_SUN5:
|
||||
#endif
|
||||
case WSKBD_TYPE_SUN:
|
||||
pKbd->scancodeMap = &wsSun;
|
||||
break;
|
||||
|
|
@ -1068,6 +1073,9 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
|||
default:
|
||||
ErrorF("Unknown wskbd type %d\n", pKbd->wsKbdType);
|
||||
}
|
||||
} else {
|
||||
pKbd->RemapScanCode = ATScancode;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static int
|
|||
KbdOn(InputInfoPtr pInfo, int what)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
|
||||
#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
|
||||
BsdKbdPrivPtr priv = (BsdKbdPrivPtr) pKbd->private;
|
||||
struct termios nTty;
|
||||
#endif
|
||||
|
|
@ -154,7 +154,7 @@ KbdOn(InputInfoPtr pInfo, int what)
|
|||
if (pKbd->isConsole) {
|
||||
switch (pKbd->consType) {
|
||||
|
||||
#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
|
||||
#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
|
||||
case SYSCONS:
|
||||
case PCCONS:
|
||||
case PCVT:
|
||||
|
|
@ -170,7 +170,10 @@ KbdOn(InputInfoPtr pInfo, int what)
|
|||
nTty.c_cc[VMIN] = 1;
|
||||
cfsetispeed(&nTty, 9600);
|
||||
cfsetospeed(&nTty, 9600);
|
||||
tcsetattr(pInfo->fd, TCSANOW, &nTty);
|
||||
if (tcsetattr(pInfo->fd, TCSANOW, &nTty) < 0) {
|
||||
xf86Msg(X_ERROR, "KbdOn: tcsetattr: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -197,7 +200,7 @@ KbdOn(InputInfoPtr pInfo, int what)
|
|||
"or use for example:\n\n"
|
||||
"Option \"Protocol\" \"wskbd\"\n"
|
||||
"Option \"Device\" \"/dev/wskbd0\"\n"
|
||||
"\nin your XF86Config(5) file\n");
|
||||
"\nin your xorg.conf(5) file\n");
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
@ -232,7 +235,7 @@ KbdOff(InputInfoPtr pInfo, int what)
|
|||
case WSCONS:
|
||||
option = WSKBD_TRANSLATED;
|
||||
ioctl(xf86Info.consoleFd, WSKBDIO_SETMODE, &option);
|
||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &(priv->kbdtty));
|
||||
tcsetattr(pInfo->fd, TCSANOW, &(priv->kbdtty));
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -292,7 +295,7 @@ Bool SpecialKey(InputInfoPtr pInfo, int key, Bool down, int modifiers)
|
|||
|
||||
if ((ModifierSet(ControlMask | AltMask)) ||
|
||||
(ModifierSet(ControlMask | AltLangMask))) {
|
||||
if (VTSwitchEnabled && !xf86Info.vtSysreq) {
|
||||
if (VTSwitchEnabled && !xf86Info.vtSysreq && !xf86Info.dontVTSwitch) {
|
||||
switch (key) {
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
|
|
@ -318,7 +321,7 @@ Bool SpecialKey(InputInfoPtr pInfo, int key, Bool down, int modifiers)
|
|||
}
|
||||
}
|
||||
#ifdef USE_VT_SYSREQ
|
||||
if (VTSwitchEnabled && xf86Info.vtSysreq) {
|
||||
if (VTSwitchEnabled && xf86Info.vtSysreq && !xf86Info.dontVTSwitch) {
|
||||
switch (key) {
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
|
|
@ -380,22 +383,30 @@ stdReadInput(InputInfoPtr pInfo)
|
|||
}
|
||||
|
||||
#ifdef WSCONS_SUPPORT
|
||||
|
||||
static void
|
||||
WSReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
struct wscons_event events[64];
|
||||
int n, i;
|
||||
int type;
|
||||
int blocked, n, i;
|
||||
|
||||
if ((n = read( pInfo->fd, events, sizeof(events))) > 0) {
|
||||
n /= sizeof(struct wscons_event);
|
||||
for (i = 0; i < n; i++)
|
||||
pKbd->PostEvent(pInfo, events[i].value,
|
||||
events[i].type == WSCONS_EVENT_KEY_DOWN ? TRUE : FALSE);
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
type = events[i].type;
|
||||
if (type == WSCONS_EVENT_KEY_UP || type == WSCONS_EVENT_KEY_DOWN) {
|
||||
/* It seems better to block SIGIO there */
|
||||
blocked = xf86BlockSIGIO();
|
||||
pKbd->PostEvent(pInfo, (unsigned int)(events[i].value),
|
||||
type == WSCONS_EVENT_KEY_DOWN ? TRUE : FALSE);
|
||||
xf86UnblockSIGIO(blocked);
|
||||
}
|
||||
} /* for */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WSCONS_SUPPORT
|
||||
static void
|
||||
printWsType(char *type, char *devname)
|
||||
{
|
||||
|
|
@ -448,15 +459,14 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
pKbd->consType = xf86Info.consType;
|
||||
}
|
||||
} else {
|
||||
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
|
||||
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
|
||||
if (pInfo->fd == -1) {
|
||||
xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
|
||||
xfree(s);
|
||||
return FALSE;
|
||||
}
|
||||
pKbd->isConsole = FALSE;
|
||||
/* XXX What is consType here? */
|
||||
pKbd->consType = SYSCONS;
|
||||
pKbd->consType = xf86Info.consType;
|
||||
xfree(s);
|
||||
}
|
||||
|
||||
|
|
@ -494,6 +504,11 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
case WSKBD_TYPE_SUN:
|
||||
printWsType("Sun", pInfo->name);
|
||||
break;
|
||||
#endif
|
||||
#ifdef WSKBD_TYPE_SUN5
|
||||
case WSKBD_TYPE_SUN5:
|
||||
xf86Msg(X_PROBED, "Keyboard type: Sun5\n");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
|
||||
|
|
@ -535,4 +550,3 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -201,32 +201,46 @@ Get460GXBridgeResources(int bus,
|
|||
* the chipset scan is to be stopped, or FALSE if the scan is to move on to the
|
||||
* next chipset.
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86PreScan460GX(void)
|
||||
xorgProbe460GX(scanpciWrapperOpt flags)
|
||||
{
|
||||
pciBusInfo_t *pBusInfo;
|
||||
PCITAG tag;
|
||||
CARD32 tmp;
|
||||
int i, devno;
|
||||
|
||||
/* Bus zero should already be set up */
|
||||
if (!(pBusInfo = pciBusInfo[0])) {
|
||||
cbn_460gx = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* First look for a 460GX's primary host bridge */
|
||||
tag = PCI_MAKE_TAG(0, 0x10, 0);
|
||||
if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
|
||||
cbn_460gx = -1;
|
||||
return FALSE;
|
||||
if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
cbn_460gx = -1;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
xf86PreScan460GX(void)
|
||||
{
|
||||
pciBusInfo_t *pBusInfo;
|
||||
PCITAG tag;
|
||||
CARD32 tmp;
|
||||
int i, devno;
|
||||
|
||||
if (!(pBusInfo = pciBusInfo[0]))
|
||||
return;
|
||||
|
||||
/* Get CBN (Chipset bus number) */
|
||||
tag = PCI_MAKE_TAG(0, 0x10, 0);
|
||||
if (!(cbn_460gx = (unsigned int)pciReadByte(tag, CBN))) {
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (pciNumBuses <= cbn_460gx)
|
||||
|
|
@ -242,7 +256,7 @@ xf86PreScan460GX(void)
|
|||
if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -257,7 +271,7 @@ xf86PreScan460GX(void)
|
|||
DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (devno == 0x10)
|
||||
|
|
@ -278,7 +292,7 @@ xf86PreScan460GX(void)
|
|||
if (cbdevs_460gx & (1 << devno)) {
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -294,7 +308,7 @@ xf86PreScan460GX(void)
|
|||
if (cbdevs_460gx & (1 << devno)) {
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -310,7 +324,7 @@ xf86PreScan460GX(void)
|
|||
break;
|
||||
/* Sanity check failed */
|
||||
cbn_460gx = -1;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +351,7 @@ xf86PreScan460GX(void)
|
|||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* This does some 460GX-related processing after the PCI bus scan */
|
||||
|
|
@ -423,7 +437,7 @@ xf86PostScan460GX(void)
|
|||
if (pPCI->funcnum > 0)
|
||||
break;
|
||||
|
||||
if ((pBusInfo = pciBusInfo[busno_460gx[i]]))
|
||||
if ((pBusInfo == pciBusInfo[busno_460gx[i]]))
|
||||
break;
|
||||
|
||||
/* Fix bus linkage */
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@
|
|||
#define PCI_460GX_H 1
|
||||
|
||||
#include <X11/Xdefs.h>
|
||||
#include <Pci.h>
|
||||
|
||||
Bool xf86PreScan460GX(void);
|
||||
Bool xorgProbe460GX(scanpciWrapperOpt flags);
|
||||
void xf86PreScan460GX(void);
|
||||
void xf86PostScan460GX(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -954,10 +954,13 @@ xf86scanpci(int flags)
|
|||
pciBusInfo_t *busp;
|
||||
int idx = 0, i;
|
||||
PCITAG tag;
|
||||
static Bool done = FALSE;
|
||||
|
||||
if (pci_devp[0])
|
||||
if (done || pci_devp[0])
|
||||
return pci_devp;
|
||||
|
||||
done = TRUE;
|
||||
|
||||
pciInit();
|
||||
|
||||
#ifdef XF86SCANPCI_WRAPPER
|
||||
|
|
|
|||
|
|
@ -34,17 +34,23 @@
|
|||
#include "Pci.h"
|
||||
|
||||
Bool
|
||||
xf86PreScanE8870(void)
|
||||
xorgProbeE8870(scanpciWrapperOpt flags)
|
||||
{
|
||||
PCITAG tag;
|
||||
|
||||
/* Look for an E8870's Hub interface */
|
||||
tag = PCI_MAKE_TAG(0, 0x1E, 0);
|
||||
if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P))
|
||||
return FALSE;
|
||||
if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_82801_P2P))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
xf86PreScanE8870(void)
|
||||
{
|
||||
/* XXX Fill me in... */
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@
|
|||
#define PCI_E8870_H 1
|
||||
|
||||
#include <X11/Xdefs.h>
|
||||
#include <Pci.h>
|
||||
|
||||
Bool xf86PreScanE8870(void);
|
||||
Bool xorgProbeE8870(scanpciWrapperOpt flags);
|
||||
void xf86PreScanE8870(void);
|
||||
void xf86PostScanE8870(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ void ix86PciSelectCfgmech(void)
|
|||
switch (xf86Info.pciFlags) {
|
||||
|
||||
case PCIOsConfig:
|
||||
#if ARCH_PCI_OS_INIT
|
||||
#ifdef ARCH_PCI_OS_INIT
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -113,14 +113,16 @@ linuxPciOpenFile(PCITAG tag)
|
|||
if (fd != -1)
|
||||
close(fd);
|
||||
if (bus < 256) {
|
||||
if (stat("/proc/bus/pci/00", &ignored) < 0)
|
||||
sprintf(file,"/proc/bus/pci/%02x",bus);
|
||||
if (stat(file, &ignored) < 0)
|
||||
sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x",
|
||||
bus, dev, func);
|
||||
else
|
||||
sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
|
||||
bus, dev, func);
|
||||
} else {
|
||||
if (stat("/proc/bus/pci/00", &ignored) < 0)
|
||||
sprintf(file,"/proc/bus/pci/%04x",bus);
|
||||
if (stat(file, &ignored) < 0)
|
||||
sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x",
|
||||
bus, dev, func);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#if defined(linux)
|
||||
#include <asm/types.h>
|
||||
#include <linux/fb.h>
|
||||
#include <asm/fbio.h>
|
||||
#include <asm/openpromio.h>
|
||||
#elif defined(SVR4)
|
||||
|
|
|
|||
|
|
@ -465,13 +465,7 @@ static pciBusInfo_t zx1FakeBus = {
|
|||
NULL, /* bridge -- dynamically set */
|
||||
};
|
||||
|
||||
/*
|
||||
* This checks for, and validates, the presence of the ZX1 chipset, and sets
|
||||
* pZX1mio to a non-NULL pointer accordingly. This function is called before
|
||||
* the server's PCI bus scan and returns TRUE if the chipset scan is to be
|
||||
* stopped, or FALSE if the scan is to move on to the next chipset.
|
||||
*/
|
||||
Bool
|
||||
void
|
||||
xf86PreScanZX1(void)
|
||||
{
|
||||
resRange range;
|
||||
|
|
@ -491,7 +485,7 @@ xf86PreScanZX1(void)
|
|||
mapSize = MIO_SIZE;
|
||||
|
||||
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
/* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */
|
||||
if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
|
||||
|
|
@ -500,7 +494,7 @@ xf86PreScanZX1(void)
|
|||
DEVID(VENDOR_HP, CHIP_ZX1_IOC))) {
|
||||
xf86UnMapVidMem(-1, pZX1mio, mapSize);
|
||||
pZX1mio = NULL;
|
||||
return FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Map rope configuration space */
|
||||
|
|
@ -510,7 +504,7 @@ xf86PreScanZX1(void)
|
|||
!(pZX1ioa = xf86MapVidMem(-1, VIDMEM_MMIO, ioaaddr, IOA_SIZE))) {
|
||||
xf86UnMapVidMem(-1, pZX1mio, mapSize);
|
||||
pZX1mio = NULL;
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
|
@ -924,7 +918,7 @@ xf86PreScanZX1(void)
|
|||
|
||||
nRange = 0;
|
||||
|
||||
return TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is called to finalise the results of a PCI bus scan */
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <X11/Xdefs.h>
|
||||
|
||||
Bool xf86PreScanZX1(void);
|
||||
void xf86PreScanZX1(void);
|
||||
void xf86PostScanZX1(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ main(int argc, char *argv[])
|
|||
|
||||
startedx = startx();
|
||||
if (XF86Config_path == NULL)
|
||||
XF86Config_path = XtNewString(__XCONFIGFILE__"-4");
|
||||
XF86Config_path = XtNewString(__XCONFIGFILE__);
|
||||
if (XkbConfig_path == NULL) {
|
||||
XmuSnprintf(XkbConfig_path_static, sizeof(XkbConfig_path_static),
|
||||
"%s/%s%s", XFree86Dir, XkbConfigDir, XkbConfigFile);
|
||||
|
|
@ -536,9 +536,9 @@ main(int argc, char *argv[])
|
|||
# endif
|
||||
#else
|
||||
# ifdef XF86CONFIGDIR
|
||||
XF86Config_path = XtNewString(XF86CONFIGDIR "/"__XCONFIGFILE__"-4");
|
||||
XF86Config_path = XtNewString(XF86CONFIGDIR "/"__XCONFIGFILE__);
|
||||
# else
|
||||
XF86Config_path = XtNewString("/etc/X11/"__XCONFIGFILE__"-4");
|
||||
XF86Config_path = XtNewString("/etc/X11/"__XCONFIGFILE__);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ typedef union {
|
|||
unsigned long num;
|
||||
char * str;
|
||||
double realnum;
|
||||
Bool bool;
|
||||
Bool xbool;
|
||||
OptFrequency freq;
|
||||
} ValueUnion;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
* Chisato Yamauchi(cyamauch@phyas.aichi-edu.ac.jp)
|
||||
*/
|
||||
/* $XConsortium: xf86config.c /main/21 1996/10/28 05:43:57 kaleb $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c,v 1.6 2004/08/13 23:57:38 alanc Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -225,7 +225,7 @@ char *config_keyboard_dev = "/dev/wskbd0";
|
|||
#endif
|
||||
int config_xkbdisable = 0;
|
||||
char *config_xkbrules;
|
||||
char *config_xkbmodel = "pc101";
|
||||
char *config_xkbmodel = "pc105";
|
||||
char *config_xkblayout = "us";
|
||||
char *config_xkbvariant = (char *) 0;
|
||||
char *config_xkboptions = (char *) 0;
|
||||
|
|
@ -679,7 +679,7 @@ mouse_configuration(void) {
|
|||
static char *xkbmodeltext =
|
||||
"Please select one of the following keyboard types that is the better\n"
|
||||
"description of your keyboard. If nothing really matches,\n"
|
||||
"choose 1 (Generic 101-key PC)\n\n";
|
||||
"choose \"Generic 104-key PC\"\n\n";
|
||||
|
||||
static char *xkblayouttext =
|
||||
"Please select the layout corresponding to your keyboard\n";
|
||||
|
|
@ -2076,7 +2076,7 @@ static char *keyboardchunk3_text =
|
|||
"# To customise the XKB settings to suit your keyboard, modify the\n"
|
||||
"# lines below (which are the defaults). For example, for a non-U.S.\n"
|
||||
"# keyboard, you will probably want to use:\n"
|
||||
"# Option \"XkbModel\" \"pc102\"\n"
|
||||
"# Option \"XkbModel\" \"pc105\"\n"
|
||||
"# If you have a US Microsoft Natural keyboard, you can use:\n"
|
||||
"# Option \"XkbModel\" \"microsoft\"\n"
|
||||
"#\n"
|
||||
|
|
@ -2093,7 +2093,7 @@ static char *keyboardchunk3_text =
|
|||
"\n"
|
||||
"# These are the default XKB settings for "__XSERVERNAME__"\n"
|
||||
"# Option \"XkbRules\" \""__XKBDEFRULES__"\"\n"
|
||||
"# Option \"XkbModel\" \"pc101\"\n"
|
||||
"# Option \"XkbModel\" \"pc105\"\n"
|
||||
"# Option \"XkbLayout\" \"us\"\n"
|
||||
"# Option \"XkbVariant\" \"\"\n"
|
||||
"# Option \"XkbOptions\" \"\"\n"
|
||||
|
|
|
|||
|
|
@ -16,16 +16,14 @@ void XAASync(ScreenPtr pScreen);
|
|||
|
||||
/* #include "render.h" */
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#define COND(pDraw) \
|
||||
((pDraw)->depth \
|
||||
!= (xaaWrapperGetScrPriv(((DrawablePtr)(pDraw))->pScreen))->depth)
|
||||
#endif
|
||||
#else
|
||||
#define COND(pDraw) 1
|
||||
|
||||
#if 0
|
||||
static Bool xaaWrapperPreCreateGC(GCPtr pGC);
|
||||
#endif
|
||||
|
||||
static Bool xaaWrapperCreateGC(GCPtr pGC);
|
||||
static void xaaWrapperValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw);
|
||||
static void xaaWrapperDestroyGC(GCPtr pGC);
|
||||
|
|
@ -36,53 +34,7 @@ static void xaaWrapperChangeClip (GCPtr pGC, int type, pointer pvalue, int nrect
|
|||
static void xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
|
||||
static void xaaWrapperDestroyClip(GCPtr pGC);
|
||||
|
||||
#if 0
|
||||
static void xaaWrapperFillSpans(DrawablePtr pDraw, GC *pGC, int nInit,
|
||||
DDXPointPtr pptInit, int *pwidthInit, int fSorted);
|
||||
static void xaaWrapperSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc,
|
||||
DDXPointPtr pptInit, int *pwidthInit, int nspans,
|
||||
int fSorted);
|
||||
static void xaaWrapperPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y,
|
||||
int w, int h,int leftPad, int format, char *pImage);
|
||||
static RegionPtr xaaWrapperCopyPlane(DrawablePtr pSrc,
|
||||
DrawablePtr pDst, GCPtr pGC,int srcx, int srcy,
|
||||
int width, int height, int dstx, int dsty,
|
||||
unsigned long bitPlane);
|
||||
static void xaaWrapperPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt,
|
||||
xPoint *pptInit);
|
||||
static void xaaWrapperPolylines(DrawablePtr pDraw, GCPtr pGC, int mode,
|
||||
int npt, DDXPointPtr pptInit);
|
||||
static void xaaWrapperPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg,
|
||||
xSegment *pSeg);
|
||||
static void xaaWrapperPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRects,
|
||||
xRectangle *pRects);
|
||||
static void xaaWrapperPolyArc( DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs);
|
||||
static void xaaWrapperFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape,
|
||||
int mode, int count, DDXPointPtr pptInit);
|
||||
static void xaaWrapperPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nRectsInit,
|
||||
xRectangle *pRectsInit);
|
||||
static RegionPtr xaaWrapperCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC *pGC,
|
||||
int srcx, int srcy, int width, int height,
|
||||
int dstx, int dsty);
|
||||
static void xaaWrapperPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
|
||||
xArc *parcs);
|
||||
static int xaaWrapperPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
|
||||
char *chars);
|
||||
static int xaaWrapperPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
|
||||
int count, unsigned short *chars);
|
||||
static void xaaWrapperImageText8(DrawablePtr pDraw, GCPtr pGC, int x,
|
||||
int y, int count, char *chars);
|
||||
static void xaaWrapperImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
|
||||
int count, unsigned short *chars);
|
||||
static void xaaWrapperImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y,
|
||||
unsigned int nglyph, CharInfoPtr *ppci,
|
||||
pointer pglyphBase);
|
||||
static void xaaWrapperPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y,
|
||||
unsigned int nglyph, CharInfoPtr *ppci,
|
||||
pointer pglyphBase);
|
||||
static void xaaWrapperPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw,
|
||||
int dx, int dy, int xOrg, int yOrg);
|
||||
#endif
|
||||
|
||||
static void
|
||||
xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
||||
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
|
||||
|
|
@ -145,25 +97,27 @@ typedef struct {
|
|||
real->mem = func; \
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define wrap_pre(priv,real,real_func,mem,func) {\
|
||||
priv->mem = real->real_func; \
|
||||
real->real_func = func; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define get(priv,real,func,wrap) \
|
||||
priv->wrap = real->func;
|
||||
|
||||
#define unwrap(priv,real,mem) {\
|
||||
real->mem = priv->mem; \
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define unwrap_pre(priv,real,real_func,mem) {\
|
||||
real->real_func = priv->mem; \
|
||||
#define cond_wrap(priv,cond,real,mem,wrapmem,func) {\
|
||||
if (COND(cond)) \
|
||||
priv->wrapmem = real->mem; \
|
||||
else \
|
||||
priv->mem = real->mem; \
|
||||
real->mem = func; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define cond_unwrap(priv,cond,real,mem,wrapmem) {\
|
||||
if (COND(cond)) \
|
||||
real->mem = priv->wrapmem; \
|
||||
else \
|
||||
real->mem = priv->mem; \
|
||||
}
|
||||
|
||||
#define get(priv,real,func,wrap) \
|
||||
priv->wrap = real->func;
|
||||
|
||||
typedef struct _xaaWrapperGCPriv {
|
||||
GCOps *ops;
|
||||
|
|
@ -210,12 +164,11 @@ xaaWrapperCreateWindow(WindowPtr pWin)
|
|||
xaaWrapperScrPriv(pWin->drawable.pScreen);
|
||||
Bool ret;
|
||||
|
||||
unwrap (pScrPriv, pWin->drawable.pScreen, CreateWindow);
|
||||
if (COND(&pWin->drawable))
|
||||
pWin->drawable.pScreen->CreateWindow
|
||||
= pScrPriv->wrapCreateWindow;
|
||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
CreateWindow, wrapCreateWindow);
|
||||
ret = pWin->drawable.pScreen->CreateWindow(pWin);
|
||||
wrap(pScrPriv, pWin->drawable.pScreen, CreateWindow, xaaWrapperCreateWindow);
|
||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, CreateWindow,
|
||||
wrapCreateWindow, xaaWrapperCreateWindow);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -244,11 +197,11 @@ xaaWrapperWindowExposures (WindowPtr pWin,
|
|||
{
|
||||
xaaWrapperScrPriv(pWin->drawable.pScreen);
|
||||
|
||||
unwrap (pScrPriv, pWin->drawable.pScreen, WindowExposures);
|
||||
if (COND(&pWin->drawable))
|
||||
pWin->drawable.pScreen->WindowExposures = pScrPriv->wrapWindowExposures;
|
||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
WindowExposures, wrapWindowExposures);
|
||||
pWin->drawable.pScreen->WindowExposures(pWin, prgn, other_exposed);
|
||||
wrap(pScrPriv, pWin->drawable.pScreen, WindowExposures, xaaWrapperWindowExposures);
|
||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -258,29 +211,24 @@ xaaWrapperPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
|
||||
switch (what) {
|
||||
case PW_BORDER:
|
||||
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder);
|
||||
if (COND(&pWin->drawable)) {
|
||||
pWin->drawable.pScreen->PaintWindowBorder
|
||||
= pScrPriv->wrapPaintWindowBorder;
|
||||
XAASync(pWin->drawable.pScreen);
|
||||
}
|
||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
PaintWindowBorder, wrapPaintWindowBorder);
|
||||
|
||||
pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what);
|
||||
wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBorder,
|
||||
xaaWrapperPaintWindow);
|
||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
PaintWindowBorder, wrapPaintWindowBorder,
|
||||
xaaWrapperPaintWindow);
|
||||
break;
|
||||
case PW_BACKGROUND:
|
||||
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBackground);
|
||||
if (COND(&pWin->drawable)) {
|
||||
pWin->drawable.pScreen->PaintWindowBackground
|
||||
= pScrPriv->wrapPaintWindowBackground;
|
||||
XAASync(pWin->drawable.pScreen);
|
||||
}
|
||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
PaintWindowBackground, wrapPaintWindowBackground);
|
||||
|
||||
pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what);
|
||||
wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBackground,
|
||||
xaaWrapperPaintWindow);
|
||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
||||
PaintWindowBackground, wrapPaintWindowBackground,
|
||||
xaaWrapperPaintWindow);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
|
@ -378,11 +326,7 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
|
|||
get (pScrPriv, pScreen, PaintWindowBorder, wrapPaintWindowBorder);
|
||||
get (pScrPriv, pScreen, PaintWindowBackground, wrapPaintWindowBackground);
|
||||
get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
|
||||
#if 0
|
||||
wrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC, xaaWrapperPreCreateGC);
|
||||
#else
|
||||
get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
|
||||
#endif
|
||||
get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
|
||||
get (pScrPriv, pScreen, DestroyColormap, wrapDestroyColormap);
|
||||
get (pScrPriv, pScreen, InstallColormap, wrapInstallColormap);
|
||||
|
|
@ -435,25 +379,6 @@ GCFuncs xaaWrapperGCFuncs = {
|
|||
xaaWrapperCopyClip
|
||||
};
|
||||
|
||||
#if 0
|
||||
GCOps xaaWrapperGCOps = {
|
||||
xaaWrapperFillSpans, xaaWrapperSetSpans,
|
||||
xaaWrapperPutImage, xaaWrapperCopyArea,
|
||||
xaaWrapperCopyPlane, xaaWrapperPolyPoint,
|
||||
xaaWrapperPolylines, xaaWrapperPolySegment,
|
||||
xaaWrapperPolyRectangle, xaaWrapperPolyArc,
|
||||
xaaWrapperFillPolygon, xaaWrapperPolyFillRect,
|
||||
xaaWrapperPolyFillArc, xaaWrapperPolyText8,
|
||||
xaaWrapperPolyText16, xaaWrapperImageText8,
|
||||
xaaWrapperImageText16, xaaWrapperImageGlyphBlt,
|
||||
xaaWrapperPolyGlyphBlt, xaaWrapperPushPixels,
|
||||
#ifdef NEED_LINEHELPER
|
||||
NULL,
|
||||
#endif
|
||||
{NULL} /* devPrivate */
|
||||
};
|
||||
#endif
|
||||
|
||||
#define XAAWRAPPER_GC_FUNC_PROLOGUE(pGC) \
|
||||
xaaWrapperGCPriv(pGC); \
|
||||
unwrap(pGCPriv, pGC, funcs); \
|
||||
|
|
@ -463,23 +388,6 @@ GCOps xaaWrapperGCOps = {
|
|||
wrap(pGCPriv, pGC, funcs, &xaaWrapperGCFuncs); \
|
||||
if (pGCPriv->wrap) wrap(pGCPriv, pGC, ops, pGCPriv->wrapops)
|
||||
|
||||
#if 0
|
||||
static Bool
|
||||
xaaWrapperPreCreateGC(GCPtr pGC)
|
||||
{
|
||||
ScreenPtr pScreen = pGC->pScreen;
|
||||
xaaWrapperScrPriv(pScreen);
|
||||
xaaWrapperGCPriv(pGC);
|
||||
Bool ret;
|
||||
|
||||
unwrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC);
|
||||
ret = (*pScreen->CreateGC) (pGC);
|
||||
wrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC, xaaWrapperPreCreateGC);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
xaaWrapperCreateGC(GCPtr pGC)
|
||||
{
|
||||
|
|
@ -572,310 +480,6 @@ xaaWrapperDestroyClip(GCPtr pGC)
|
|||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define XAAWRAPPER_GC_OP_PROLOGUE(pGC,pDraw) \
|
||||
/* xaaWrapperScrPriv(pDraw->pScreen); */\
|
||||
xaaWrapperGCPriv(pGC); \
|
||||
GCFuncs *oldFuncs = pGC->funcs; \
|
||||
unwrap(pGCPriv, pGC, funcs); \
|
||||
unwrap(pGCPriv, pGC, ops); \
|
||||
|
||||
#define XAAWRAPPER_GC_OP_EPILOGUE(pGC,pDraw) \
|
||||
wrap(pGCPriv, pGC, funcs, oldFuncs); \
|
||||
wrap(pGCPriv, pGC, ops, &xaaWrapperGCOps)
|
||||
|
||||
static void
|
||||
xaaWrapperFillSpans(
|
||||
DrawablePtr pDraw,
|
||||
GC *pGC,
|
||||
int nInit,
|
||||
DDXPointPtr pptInit,
|
||||
int *pwidthInit,
|
||||
int fSorted
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperSetSpans(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
char *pcharsrc,
|
||||
DDXPointPtr pptInit,
|
||||
int *pwidthInit,
|
||||
int nspans,
|
||||
int fSorted
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
|
||||
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit,
|
||||
pwidthInit, nspans, fSorted);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
xaaWrapperPutImage(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int depth,
|
||||
int x, int y, int w, int h,
|
||||
int leftPad,
|
||||
int format,
|
||||
char *pImage
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
|
||||
leftPad, format, pImage);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static RegionPtr
|
||||
xaaWrapperCopyArea(
|
||||
DrawablePtr pSrc,
|
||||
DrawablePtr pDst,
|
||||
GC *pGC,
|
||||
int srcx, int srcy,
|
||||
int width, int height,
|
||||
int dstx, int dsty
|
||||
){
|
||||
RegionPtr ret;
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDst);
|
||||
ret = (*pGC->ops->CopyArea)(pSrc, pDst,
|
||||
pGC, srcx, srcy, width, height, dstx, dsty);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDst);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static RegionPtr
|
||||
xaaWrapperCopyPlane(
|
||||
DrawablePtr pSrc,
|
||||
DrawablePtr pDst,
|
||||
GCPtr pGC,
|
||||
int srcx, int srcy,
|
||||
int width, int height,
|
||||
int dstx, int dsty,
|
||||
unsigned long bitPlane
|
||||
){
|
||||
RegionPtr ret;
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDst);
|
||||
ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
|
||||
pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDst);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyPoint(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int mode,
|
||||
int npt,
|
||||
xPoint *pptInit
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolylines(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int mode,
|
||||
int npt,
|
||||
DDXPointPtr pptInit
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolySegment(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int nseg,
|
||||
xSegment *pSeg
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyRectangle(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int nRects,
|
||||
xRectangle *pRects
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyRectangle)(pDraw, pGC, nRects, pRects);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyArc(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int narcs,
|
||||
xArc *parcs
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperFillPolygon(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int shape,
|
||||
int mode,
|
||||
int count,
|
||||
DDXPointPtr pptInit
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, pptInit);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyFillRect(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int nRectsInit,
|
||||
xRectangle *pRectsInit
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyFillRect)(pDraw, pGC, nRectsInit, pRectsInit);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyFillArc(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int narcs,
|
||||
xArc *parcs
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static int
|
||||
xaaWrapperPolyText8(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x,
|
||||
int y,
|
||||
int count,
|
||||
char *chars
|
||||
){
|
||||
int width;
|
||||
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
width = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
static int
|
||||
xaaWrapperPolyText16(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x,
|
||||
int y,
|
||||
int count,
|
||||
unsigned short *chars
|
||||
){
|
||||
int width;
|
||||
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
width = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperImageText8(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x,
|
||||
int y,
|
||||
int count,
|
||||
char *chars
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperImageText16(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x,
|
||||
int y,
|
||||
int count,
|
||||
unsigned short *chars
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperImageGlyphBlt(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x, int y,
|
||||
unsigned int nglyph,
|
||||
CharInfoPtr *ppci,
|
||||
pointer pglyphBase
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, nglyph,
|
||||
ppci, pglyphBase);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPolyGlyphBlt(
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
int x, int y,
|
||||
unsigned int nglyph,
|
||||
CharInfoPtr *ppci,
|
||||
pointer pglyphBase
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PolyGlyphBlt)(pDraw, pGC, x, y, nglyph,
|
||||
ppci, pglyphBase);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
|
||||
static void
|
||||
xaaWrapperPushPixels(
|
||||
GCPtr pGC,
|
||||
PixmapPtr pBitMap,
|
||||
DrawablePtr pDraw,
|
||||
int dx, int dy, int xOrg, int yOrg
|
||||
){
|
||||
XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
|
||||
(*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
|
||||
XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RENDER
|
||||
static void
|
||||
xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/include/globals.h,v 1.4 2004/07/31 09:14:06 kem Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/include/globals.h,v 1.3 1999/09/25 14:38:21 dawes Exp $ */
|
||||
|
||||
#ifndef _XSERV_GLOBAL_H_
|
||||
|
|
@ -42,23 +42,163 @@ extern Bool DPMSCapableFlag;
|
|||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
extern Bool PanoramiXMapped;
|
||||
extern Bool PanoramiXVisibilityNotifySent;
|
||||
extern Bool PanoramiXWindowExposureSent;
|
||||
extern Bool PanoramiXOneExposeRequest;
|
||||
#endif
|
||||
|
||||
#ifdef RENDER
|
||||
extern Bool noRenderExtension;
|
||||
#ifdef BEZIER
|
||||
extern Bool noBezierExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XEVIE
|
||||
extern Bool noXevieExtension;
|
||||
#ifdef BIGREQS
|
||||
extern Bool noBigReqExtension;
|
||||
#endif
|
||||
|
||||
#ifdef COMPOSITE
|
||||
extern Bool noCompositeExtension;
|
||||
#endif
|
||||
|
||||
#endif /* _XSERV_GLOBAL_H_ */
|
||||
#ifdef DAMAGE
|
||||
extern Bool noDamageExtension;
|
||||
#endif
|
||||
|
||||
#ifdef DBE
|
||||
extern Bool noDbeExtension;
|
||||
#endif
|
||||
|
||||
#ifdef DPSEXT
|
||||
extern Bool noDPSExtension;
|
||||
#endif
|
||||
|
||||
#ifdef DPMSExtension
|
||||
extern Bool noDPMSExtension;
|
||||
#endif
|
||||
|
||||
#ifdef EVI
|
||||
extern Bool noEVIExtension;
|
||||
#endif
|
||||
|
||||
#ifdef FONTCACHE
|
||||
extern Bool noFontCacheExtension;
|
||||
#endif
|
||||
|
||||
#ifdef GLXEXT
|
||||
extern Bool noGlxExtension;
|
||||
#endif
|
||||
|
||||
#ifdef LBX
|
||||
extern Bool noLbxExtension;
|
||||
#endif
|
||||
|
||||
#ifdef SCREENSAVER
|
||||
extern Bool noScreenSaverExtension;
|
||||
#endif
|
||||
|
||||
#ifdef MITSHM
|
||||
extern Bool noMITShmExtension;
|
||||
#endif
|
||||
|
||||
#ifdef MITMISC
|
||||
extern Bool noMITMiscExtension;
|
||||
#endif
|
||||
|
||||
#ifdef MULTIBUFFER
|
||||
extern Bool noMultibufferExtension;
|
||||
#endif
|
||||
|
||||
#ifdef RANDR
|
||||
extern Bool noRRExtension;
|
||||
#endif
|
||||
|
||||
#ifdef RENDER
|
||||
extern Bool noRenderExtension;
|
||||
#endif
|
||||
|
||||
#ifdef SHAPE
|
||||
extern Bool noShapeExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XCSECURITY
|
||||
extern Bool noSecurityExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XSYNC
|
||||
extern Bool noSyncExtension;
|
||||
#endif
|
||||
|
||||
#ifdef TOGCUP
|
||||
extern Bool noXcupExtension;
|
||||
#endif
|
||||
|
||||
#ifdef PEXEXT
|
||||
extern Bool noPexExtension;
|
||||
#endif
|
||||
|
||||
#ifdef RES
|
||||
extern Bool noResExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XAPPGROUP
|
||||
extern Bool noXagExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XCMISC
|
||||
extern Bool noXCMiscExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XEVIE
|
||||
extern Bool noXevieExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XIE
|
||||
extern Bool noXie;
|
||||
#endif
|
||||
|
||||
#ifdef XF86BIGFONT
|
||||
extern Bool noXFree86BigfontExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XFreeXDGA
|
||||
extern Bool noXFree86DGAExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XF86DRI
|
||||
extern Bool noXFree86DRIExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XF86MISC
|
||||
extern Bool noXFree86MiscExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XF86VIDMODE
|
||||
extern Bool noXFree86VidModeExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XFIXES
|
||||
extern Bool noXFixesExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XKB
|
||||
/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
|
||||
extern Bool noXkbExtension;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XINPUT
|
||||
extern Bool noXInputExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XIDLE
|
||||
extern Bool noXIdleExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XV
|
||||
extern Bool noXvExtension;
|
||||
#endif
|
||||
|
||||
#endif /* !_XSERV_GLOBAL_H_ */
|
||||
|
|
|
|||
|
|
@ -55,10 +55,11 @@ miInitVisualsProcPtr miInitVisualsProc = miDoInitVisuals;
|
|||
int
|
||||
miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
|
||||
{
|
||||
/* By the time we are processing requests, we can guarantee that there
|
||||
* is always a colormap installed */
|
||||
*pmaps = miInstalledMaps[pScreen->myNum]->mid;
|
||||
return (1);
|
||||
if (miInstalledMaps[pScreen->myNum]) {
|
||||
*pmaps = miInstalledMaps[pScreen->myNum]->mid;
|
||||
return (1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
387
mi/miinitext.c
387
mi/miinitext.c
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.12 2004/08/12 08:45:33 anholt Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
|
@ -74,7 +74,6 @@ SOFTWARE.
|
|||
#undef SCREENSAVER
|
||||
#undef XIDLE
|
||||
#undef XRECORD
|
||||
#undef DBE
|
||||
#undef XF86VIDMODE
|
||||
#undef XF86MISC
|
||||
#undef XFreeXDGA
|
||||
|
|
@ -88,21 +87,123 @@ SOFTWARE.
|
|||
#undef XEVIE
|
||||
#endif /* PRINT_ONLY_SERVER */
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
#endif
|
||||
|
||||
extern Bool noTestExtensions;
|
||||
#ifdef XKB
|
||||
extern Bool noXkbExtension;
|
||||
|
||||
#ifdef BEZIER
|
||||
extern Bool noBezierExtension;
|
||||
#endif
|
||||
#ifdef BIGREQS
|
||||
extern Bool noBigReqExtension;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
extern Bool noCompositeExtension;
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
extern Bool noDamageExtension;
|
||||
#endif
|
||||
#ifdef DBE
|
||||
extern Bool noDbeExtension;
|
||||
#endif
|
||||
#ifdef DPSEXT
|
||||
extern Bool noDPSExtension;
|
||||
#endif
|
||||
#ifdef DPMSExtension
|
||||
extern Bool noDPMSExtension;
|
||||
#endif
|
||||
#ifdef EVI
|
||||
extern Bool noEVIExtension;
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
extern Bool noFontCacheExtension;
|
||||
#endif
|
||||
#ifdef GLXEXT
|
||||
extern Bool noGlxExtension;
|
||||
#endif
|
||||
#ifdef LBX
|
||||
extern Bool noLbxExtension;
|
||||
#endif
|
||||
#ifdef SCREENSAVER
|
||||
extern Bool noScreenSaverExtension;
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
extern Bool noMITShmExtension;
|
||||
#endif
|
||||
#ifdef MITMISC
|
||||
extern Bool noMITMiscExtension;
|
||||
#endif
|
||||
#ifdef MULTIBUFFER
|
||||
extern Bool noMultibufferExtension;
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
extern Bool noRRExtension;
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
extern Bool noRenderExtension;
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
extern Bool noShapeExtension;
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
extern Bool noSecurityExtension;
|
||||
#endif
|
||||
#ifdef XSYNC
|
||||
extern Bool noSyncExtension;
|
||||
#endif
|
||||
#ifdef TOGCUP
|
||||
extern Bool noXcupExtension;
|
||||
#endif
|
||||
#ifdef PEXEXT
|
||||
extern Bool noPexExtension;
|
||||
#endif
|
||||
#ifdef RES
|
||||
extern Bool noResExtension;
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
extern Bool noXagExtension;
|
||||
#endif
|
||||
#ifdef XCMISC
|
||||
extern Bool noXCMiscExtension;
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
extern Bool noXevieExtension;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
extern Bool noCompositeExtension;
|
||||
#ifdef XIE
|
||||
extern Bool noXie;
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
extern Bool noXFree86BigfontExtension;
|
||||
#endif
|
||||
#ifdef XFreeXDGA
|
||||
extern Bool noXFree86DGAExtension;
|
||||
#endif
|
||||
#ifdef XF86DRI
|
||||
extern Bool noXFree86DRIExtension;
|
||||
#endif
|
||||
#ifdef XF86MISC
|
||||
extern Bool noXFree86MiscExtension;
|
||||
#endif
|
||||
#ifdef XF86VIDMODE
|
||||
extern Bool noXFree86VidModeExtension;
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
extern Bool noXFixesExtension;
|
||||
#endif
|
||||
#ifdef XKB
|
||||
/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
|
||||
extern Bool noXkbExtension;
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
extern Bool noXInputExtension;
|
||||
#endif
|
||||
#ifdef XIDLE
|
||||
extern Bool noXIdleExtension;
|
||||
#endif
|
||||
#ifdef XV
|
||||
extern Bool noXvExtension;
|
||||
#endif
|
||||
|
||||
#ifndef XFree86LOADER
|
||||
|
|
@ -299,21 +400,118 @@ typedef struct {
|
|||
|
||||
static ExtensionToggle ExtensionToggleList[] =
|
||||
{
|
||||
{ "XTEST", &noTestExtensions },
|
||||
#ifdef PANORAMIX
|
||||
{ "XINERAMA", &noPanoramiXExtension },
|
||||
/* sort order is extension name string as shown in xdpyinfo */
|
||||
#ifdef BEZIER
|
||||
{ "BEZIER", &noBezierExtension },
|
||||
#endif
|
||||
#ifdef BIGREQS
|
||||
{ "BIG-REQUESTS", &noBigReqExtension },
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
{ "Composite", &noCompositeExtension },
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
{ "DAMAGE", &noDamageExtension },
|
||||
#endif
|
||||
#ifdef DBE
|
||||
{ "DOUBLE-BUFFER", &noDbeExtension },
|
||||
#endif
|
||||
#ifdef DPSEXT
|
||||
{ "DPSExtension", &noDPSExtension },
|
||||
#endif
|
||||
#ifdef DPMSExtension
|
||||
{ "DPMS", &noDPMSExtension },
|
||||
#endif
|
||||
#ifdef EVI
|
||||
{ "Extended-Visual-Information", &noEVIExtension },
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
{ "FontCache", &noFontCacheExtension },
|
||||
#endif
|
||||
#ifdef GLXEXT
|
||||
{ "GLX", &noGlxExtension },
|
||||
#endif
|
||||
#ifdef LBX
|
||||
{ "LBX", &noLbxExtension },
|
||||
#endif
|
||||
#ifdef SCREENSAVER
|
||||
{ "MIT-SCREEN-SAVER", &noScreenSaverExtension },
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
{ SHMNAME, &noMITShmExtension },
|
||||
#endif
|
||||
#ifdef MITMISC
|
||||
{ "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension },
|
||||
#endif
|
||||
#ifdef MULTIBUFFER
|
||||
{ "Multi-Buffering", &noMultibufferExtension },
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
{ "RANDR", &noRRExtension },
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
{ "RENDER", &noRenderExtension },
|
||||
#endif
|
||||
#ifdef XKB
|
||||
{ "XKEYBOARD", &noXkbExtension },
|
||||
#ifdef SHAPE
|
||||
{ "SHAPE", &noShapeExtension },
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
{ "SECURITY", &noSecurityExtension },
|
||||
#endif
|
||||
#ifdef XSYNC
|
||||
{ "SYNC", &noSyncExtension },
|
||||
#endif
|
||||
#ifdef TOGCUP
|
||||
{ "TOG-CUP", &noXcupExtension },
|
||||
#endif
|
||||
#ifdef PEXEXT
|
||||
{ "X3D-PEX", &noPexExtension },
|
||||
#endif
|
||||
#ifdef RES
|
||||
{ "X-Resource", &noResExtension },
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
{ "XC-APPGROUP", &noXagExtension },
|
||||
#endif
|
||||
#ifdef XCMISC
|
||||
{ "XC-MISC", &noXCMiscExtension },
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
{ "XEVIE", &noXevieExtension },
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
{ "Composite", &noCompositeExtension },
|
||||
#ifdef XF86BIGFONT
|
||||
{ "XFree86-Bigfont", &noXFree86BigfontExtension },
|
||||
#endif
|
||||
#ifdef XFreeXDGA
|
||||
{ "XFree86-DGA", &noXFree86DGAExtension },
|
||||
#endif
|
||||
#ifdef XF86DRI
|
||||
{ "XFree86-DRI", &noXFree86DRIExtension },
|
||||
#endif
|
||||
#ifdef XF86MISC
|
||||
{ "XFree86-Misc", &noXFree86MiscExtension },
|
||||
#endif
|
||||
#ifdef XF86VIDMODE
|
||||
{ "XFree86-VidModeExtension", &noXFree86VidModeExtension },
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
{ "XFIXES", &noXFixesExtension },
|
||||
#endif
|
||||
#ifdef XIE
|
||||
{ "XIE", &noXie },
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
{ "XINERAMA", &noPanoramiXExtension },
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
{ "XInputExtension", &noXInputExtension },
|
||||
#endif
|
||||
#ifdef XKB
|
||||
{ "XKEYBOARD", &noXkbExtension },
|
||||
#endif
|
||||
{ "XTEST", &noTestExtensions },
|
||||
#ifdef XV
|
||||
{ "XVideo", &noXvExtension },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
@ -357,134 +555,136 @@ InitExtensions(argc, argv)
|
|||
# endif
|
||||
#endif
|
||||
#ifdef BEZIER
|
||||
BezierExtensionInit();
|
||||
if (!noBezierExtension) BezierExtensionInit();
|
||||
#endif
|
||||
#ifdef XTESTEXT1
|
||||
if (!noTestExtensions) XTestExtension1Init();
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
ShapeExtensionInit();
|
||||
if (!noShapeExtension) ShapeExtensionInit();
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
ShmExtensionInit();
|
||||
if (!noMITShmExtension) ShmExtensionInit();
|
||||
#endif
|
||||
#ifdef EVI
|
||||
EVIExtensionInit();
|
||||
if (!noEVIExtension) EVIExtensionInit();
|
||||
#endif
|
||||
#ifdef PEXEXT
|
||||
PexExtensionInit();
|
||||
if (!noPexExtension) PexExtensionInit();
|
||||
#endif
|
||||
#ifdef MULTIBUFFER
|
||||
MultibufferExtensionInit();
|
||||
if (!noMultibufferExtension) MultibufferExtensionInit();
|
||||
#endif
|
||||
#if defined(XINPUT) && !defined(NO_HW_ONLY_EXTS)
|
||||
XInputExtensionInit();
|
||||
if (!noXInputExtension) XInputExtensionInit();
|
||||
#endif
|
||||
#ifdef XTEST
|
||||
if (!noTestExtensions) XTestExtensionInit();
|
||||
#endif
|
||||
#ifdef BIGREQS
|
||||
BigReqExtensionInit();
|
||||
if (!noBigReqExtension) BigReqExtensionInit();
|
||||
#endif
|
||||
#ifdef MITMISC
|
||||
MITMiscExtensionInit();
|
||||
if (!noMITMiscExtension) MITMiscExtensionInit();
|
||||
#endif
|
||||
#ifdef XIDLE
|
||||
XIdleExtensionInit();
|
||||
if (!noXIdleExtension) XIdleExtensionInit();
|
||||
#endif
|
||||
#ifdef XTRAP
|
||||
if (!noTestExtensions) DEC_XTRAPInit();
|
||||
#endif
|
||||
#if defined(SCREENSAVER) && !defined(PRINT_ONLY_SERVER)
|
||||
ScreenSaverExtensionInit ();
|
||||
if (!noScreenSaverExtension) ScreenSaverExtensionInit ();
|
||||
#endif
|
||||
#ifdef XV
|
||||
XvExtensionInit();
|
||||
XvMCExtensionInit();
|
||||
if (!noXvExtension) {
|
||||
XvExtensionInit();
|
||||
XvMCExtensionInit();
|
||||
}
|
||||
#endif
|
||||
#ifdef XIE
|
||||
XieInit();
|
||||
if (!noXie) XieInit();
|
||||
#endif
|
||||
#ifdef XSYNC
|
||||
SyncExtensionInit();
|
||||
if (!noSyncExtension) SyncExtensionInit();
|
||||
#endif
|
||||
#if defined(XKB) && !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS)
|
||||
if (!noXkbExtension) XkbExtensionInit();
|
||||
#endif
|
||||
#ifdef XCMISC
|
||||
XCMiscExtensionInit();
|
||||
if (!noXCMiscExtension) XCMiscExtensionInit();
|
||||
#endif
|
||||
#ifdef XRECORD
|
||||
if (!noTestExtensions) RecordExtensionInit();
|
||||
#endif
|
||||
#ifdef LBX
|
||||
LbxExtensionInit();
|
||||
if (!noLbxExtension) LbxExtensionInit();
|
||||
#endif
|
||||
#ifdef DBE
|
||||
DbeExtensionInit();
|
||||
if (!noDbeExtension) DbeExtensionInit();
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
XagExtensionInit();
|
||||
if (!noXagExtension) XagExtensionInit();
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
SecurityExtensionInit();
|
||||
if (!noSecurityExtension) SecurityExtensionInit();
|
||||
#endif
|
||||
#ifdef XPRINT
|
||||
XpExtensionInit();
|
||||
XpExtensionInit(); /* server-specific extension, cannot be disabled */
|
||||
#endif
|
||||
#ifdef TOGCUP
|
||||
XcupExtensionInit();
|
||||
if (!noXcupExtension) XcupExtensionInit();
|
||||
#endif
|
||||
#if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS)
|
||||
DPMSExtensionInit();
|
||||
if (!noDPMSExtension) DPMSExtensionInit();
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
FontCacheExtensionInit();
|
||||
if (!noFontCacheExtension) FontCacheExtensionInit();
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
XFree86BigfontExtensionInit();
|
||||
if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
|
||||
#endif
|
||||
#if !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS)
|
||||
#if defined(XF86VIDMODE)
|
||||
XFree86VidModeExtensionInit();
|
||||
if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit();
|
||||
#endif
|
||||
#if defined(XF86MISC)
|
||||
XFree86MiscExtensionInit();
|
||||
if (!noXFree86MiscExtension) XFree86MiscExtensionInit();
|
||||
#endif
|
||||
#if defined(XFreeXDGA)
|
||||
XFree86DGAExtensionInit();
|
||||
if (!noXFree86DGAExtension) XFree86DGAExtensionInit();
|
||||
#endif
|
||||
#ifdef XF86DRI
|
||||
XFree86DRIExtensionInit();
|
||||
if (!noXFree86DRIExtension) XFree86DRIExtensionInit();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef GLXEXT
|
||||
#ifndef __DARWIN__
|
||||
GlxExtensionInit();
|
||||
if (!noGlxExtension) GlxExtensionInit();
|
||||
#else
|
||||
DarwinGlxExtensionInit();
|
||||
if (!noGlxExtension) DarwinGlxExtensionInit();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef DPSEXT
|
||||
#ifndef XPRINT
|
||||
DPSExtensionInit();
|
||||
if (!noDPSExtension) DPSExtensionInit();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
/* must be before Render to layer DisplayCursor correctly */
|
||||
XFixesExtensionInit();
|
||||
if (!noXFixesExtension) XFixesExtensionInit();
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
if (!noRenderExtension) RenderExtensionInit();
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
RRExtensionInit();
|
||||
if (!noRRExtension) RRExtensionInit();
|
||||
#endif
|
||||
#ifdef RES
|
||||
ResExtensionInit();
|
||||
if (!noResExtension) ResExtensionInit();
|
||||
#endif
|
||||
#ifdef DMXEXT
|
||||
DMXExtensionInit();
|
||||
DMXExtensionInit(); /* server-specific extension, cannot be disabled */
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
if (!noXevieExtension) XevieExtensionInit();
|
||||
|
|
@ -493,7 +693,7 @@ InitExtensions(argc, argv)
|
|||
if (!noCompositeExtension) CompositeExtensionInit();
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
DamageExtensionInit();
|
||||
if (!noDamageExtension) DamageExtensionInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -511,96 +711,37 @@ InitVisualWrap()
|
|||
}
|
||||
|
||||
#else /* XFree86LOADER */
|
||||
#if 0
|
||||
/* FIXME:The names here must come from the headers. those with ?? are
|
||||
not included in X11R6.3 sample implementation, so there's a problem... */
|
||||
/* XXX use the correct #ifdefs for symbols not present when an extension
|
||||
is disabled */
|
||||
ExtensionModule extension[] =
|
||||
{
|
||||
{ NULL, "BEZIER", NULL, NULL }, /* ?? */
|
||||
{ NULL, "XTEST1", &noTestExtensions, NULL }, /* ?? */
|
||||
{ NULL, "SHAPE", NULL, NULL },
|
||||
{ NULL, "MIT-SHM", NULL, NULL },
|
||||
{ NULL, "X3D-PEX", NULL, NULL },
|
||||
{ NULL, "Multi-Buffering", NULL, NULL },
|
||||
{ NULL, "XInputExtension", NULL, NULL },
|
||||
{ NULL, "XTEST", &noTestExtensions, NULL },
|
||||
{ NULL, "BIG-REQUESTS", NULL, NULL },
|
||||
{ NULL, "MIT-SUNDRY-NONSTANDARD", NULL, NULL },
|
||||
{ NULL, "XIDLE", NULL, NULL }, /* ?? */
|
||||
{ NULL, "XTRAP", &noTestExtensions, NULL }, /* ?? */
|
||||
{ NULL, "MIT-SCREEN-SAVER", NULL, NULL },
|
||||
{ NULL, "XVideo", NULL, NULL }, /* ?? */
|
||||
{ NULL, "XIE", NULL, NULL },
|
||||
{ NULL, "SYNC", NULL, NULL },
|
||||
#ifdef XKB
|
||||
{ NULL, "XKEYBOARD", &noXkbExtension, NULL },
|
||||
#else
|
||||
{ NULL, "NOXKEYBOARD", NULL, NULL },
|
||||
#endif
|
||||
{ NULL, "XC-MISC", NULL, NULL },
|
||||
{ NULL, "RECORD", &noTestExtensions, NULL },
|
||||
{ NULL, "LBX", NULL, NULL },
|
||||
{ NULL, "DOUBLE-BUFFER", NULL, NULL },
|
||||
{ NULL, "XC-APPGROUP", NULL, NULL },
|
||||
{ NULL, "SECURITY", NULL, NULL },
|
||||
{ NULL, "XpExtension", NULL, NULL },
|
||||
{ NULL, "XFree86-VidModeExtension", NULL, NULL },
|
||||
{ NULL, "XFree86-Misc", NULL, NULL },
|
||||
{ NULL, "XFree86-DGA", NULL, NULL },
|
||||
{ NULL, "DPMS", NULL, NULL },
|
||||
{ NULL, "GLX", NULL, NULL },
|
||||
{ NULL, "TOG-CUP", NULL, NULL },
|
||||
{ NULL, "Extended-Visual-Information", NULL, NULL },
|
||||
#ifdef PANORAMIX
|
||||
{ NULL, "XINERAMA", &noPanoramiXExtension, NULL },
|
||||
#else
|
||||
{ NULL, "NOXINERAMA", NULL, NULL },
|
||||
#endif
|
||||
{ NULL, "XFree86-Bigfont", NULL, NULL },
|
||||
{ NULL, "XFree86-DRI", NULL, NULL },
|
||||
{ NULL, "Adobe-DPS-Extension", NULL, NULL },
|
||||
{ NULL, "FontCache", NULL, NULL },
|
||||
{ NULL, "RENDER", NULL, NULL },
|
||||
{ NULL, "RANDR", NULL, NULL },
|
||||
{ NULL, "X-Resource", NULL, NULL },
|
||||
{ NULL, "DMX", NULL, NULL },
|
||||
{ NULL, NULL, NULL, NULL }
|
||||
};
|
||||
#endif
|
||||
|
||||
/* List of built-in (statically linked) extensions */
|
||||
static ExtensionModule staticExtensions[] = {
|
||||
#ifdef BEZIER
|
||||
{ BezierExtensionInit, "BEZIER", NULL, NULL, NULL },
|
||||
{ BezierExtensionInit, "BEZIER", &noBezierExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XTESTEXT1
|
||||
{ XTestExtension1Init, "XTEST1", &noTestExtensions, NULL, NULL },
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
{ ShmExtensionInit, SHMNAME, NULL, NULL, NULL },
|
||||
{ ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
{ XInputExtensionInit, "XInputExtension", NULL, NULL, NULL },
|
||||
{ XInputExtensionInit, "XInputExtension", &noXInputExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XTEST
|
||||
{ XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XIDLE
|
||||
{ XIdleExtensionInit, "XIDLE", NULL, NULL, NULL },
|
||||
{ XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XKB
|
||||
{ XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef LBX
|
||||
{ LbxExtensionInit, LBXNAME, NULL, NULL, NULL },
|
||||
{ LbxExtensionInit, LBXNAME, &noLbxExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
{ XagExtensionInit, XAGNAME, NULL, NULL, NULL },
|
||||
{ XagExtensionInit, XAGNAME, &noXagExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, NULL, NULL, NULL },
|
||||
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XPRINT
|
||||
{ XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
|
||||
|
|
@ -610,22 +751,22 @@ static ExtensionModule staticExtensions[] = {
|
|||
#endif
|
||||
#ifdef XFIXES
|
||||
/* must be before Render to layer DisplayCursor correctly */
|
||||
{ XFixesExtensionInit, "XFIXES", NULL, NULL, NULL },
|
||||
{ XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
{ XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL },
|
||||
{ XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
{ RenderExtensionInit, "RENDER", &noRenderExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
{ RRExtensionInit, "RANDR", NULL, NULL, NULL },
|
||||
{ RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
{ CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
{ DamageExtensionInit, "DAMAGE", NULL, NULL },
|
||||
{ DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL },
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
{ XevieExtensionInit, "XEVIE", &noXevieExtension, NULL },
|
||||
|
|
|
|||
|
|
@ -1349,7 +1349,7 @@ damagePolyText8(DrawablePtr pDrawable,
|
|||
DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
|
||||
|
||||
if (checkGCDamage (pDrawable, pGC))
|
||||
damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
|
||||
x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
|
||||
Linear8Bit, TT_POLY8);
|
||||
else
|
||||
x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
|
||||
|
|
@ -1368,7 +1368,7 @@ damagePolyText16(DrawablePtr pDrawable,
|
|||
DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
|
||||
|
||||
if (checkGCDamage (pDrawable, pGC))
|
||||
damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
|
||||
x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
|
||||
FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
|
||||
TT_POLY16);
|
||||
else
|
||||
|
|
|
|||
18
os/WaitFor.c
18
os/WaitFor.c
|
|
@ -663,17 +663,11 @@ SetDPMSTimers(void)
|
|||
if (!DPMSEnabled)
|
||||
return;
|
||||
|
||||
if (DPMSStandbyTime > 0) {
|
||||
DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime,
|
||||
DPMSStandbyTimerExpire, NULL);
|
||||
}
|
||||
if (DPMSSuspendTime > 0) {
|
||||
DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime,
|
||||
DPMSSuspendTimerExpire, NULL);
|
||||
}
|
||||
if (DPMSOffTime > 0) {
|
||||
DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime,
|
||||
DPMSOffTimerExpire, NULL);
|
||||
}
|
||||
DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime,
|
||||
DPMSStandbyTimerExpire, NULL);
|
||||
DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime,
|
||||
DPMSSuspendTimerExpire, NULL);
|
||||
DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime,
|
||||
DPMSOffTimerExpire, NULL);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
138
os/utils.c
138
os/utils.c
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.1.4.3.2.4 2004/09/15 16:34:15 ago Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
|
|
@ -119,8 +119,126 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#ifdef RENDER
|
||||
#include "picture.h"
|
||||
#endif
|
||||
|
||||
Bool noTestExtensions;
|
||||
#ifdef BEZIER
|
||||
Bool noBezierExtension = FALSE;
|
||||
#endif
|
||||
#ifdef BIGREQS
|
||||
Bool noBigReqExtension = FALSE;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
/* COMPOSITE is disabled by default for now until the
|
||||
* interface is stable */
|
||||
Bool noCompositeExtension = TRUE;
|
||||
#endif
|
||||
#ifdef DAMAGE
|
||||
Bool noDamageExtension = FALSE;
|
||||
#endif
|
||||
#ifdef DBE
|
||||
Bool noDbeExtension = FALSE;
|
||||
#endif
|
||||
#ifdef DPSEXT
|
||||
Bool noDPSExtension = FALSE;
|
||||
#endif
|
||||
#ifdef DPMSExtension
|
||||
Bool noDPMSExtension = FALSE;
|
||||
#endif
|
||||
#ifdef EVI
|
||||
Bool noEVIExtension = FALSE;
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
Bool noFontCacheExtension = FALSE;
|
||||
#endif
|
||||
#ifdef GLXEXT
|
||||
Bool noGlxExtension = FALSE;
|
||||
#endif
|
||||
#ifdef LBX
|
||||
Bool noLbxExtension = FALSE;
|
||||
#endif
|
||||
#ifdef SCREENSAVER
|
||||
Bool noScreenSaverExtension = FALSE;
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
Bool noMITShmExtension = FALSE;
|
||||
#endif
|
||||
#ifdef MITMISC
|
||||
Bool noMITMiscExtension = FALSE;
|
||||
#endif
|
||||
#ifdef MULTIBUFFER
|
||||
Bool noMultibufferExtension = FALSE;
|
||||
#endif
|
||||
#ifdef RANDR
|
||||
Bool noRRExtension = FALSE;
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
Bool noRenderExtension = FALSE;
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
Bool noShapeExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
Bool noSecurityExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XSYNC
|
||||
Bool noSyncExtension = FALSE;
|
||||
#endif
|
||||
#ifdef TOGCUP
|
||||
Bool noXcupExtension = FALSE;
|
||||
#endif
|
||||
#ifdef PEXEXT
|
||||
Bool noPexExtension = FALSE;
|
||||
#endif
|
||||
#ifdef RES
|
||||
Bool noResExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XAPPGROUP
|
||||
Bool noXagExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XCMISC
|
||||
Bool noXCMiscExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XEVIE
|
||||
/* Xevie is disabled by default for now until the
|
||||
* interface is stable */
|
||||
Bool noXevieExtension = TRUE;
|
||||
#endif
|
||||
#ifdef XIE
|
||||
Bool noXie = FALSE;
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
Bool noXFree86BigfontExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XFreeXDGA
|
||||
Bool noXFree86DGAExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XF86DRI
|
||||
Bool noXFree86DRIExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XF86MISC
|
||||
Bool noXFree86MiscExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XF86VIDMODE
|
||||
Bool noXFree86VidModeExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
Bool noXFixesExtension = FALSE;
|
||||
#endif
|
||||
/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
|
||||
#ifdef PANORAMIX
|
||||
/* Xinerama is disabled by default unless enabled via +xinerama */
|
||||
Bool noPanoramiXExtension = TRUE;
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
Bool noXInputExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XIDLE
|
||||
Bool noXIdleExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XV
|
||||
Bool noXvExtension = FALSE;
|
||||
#endif
|
||||
|
||||
#define X_INCLUDE_NETDB_H
|
||||
#include <X11/Xos_r.h>
|
||||
|
|
@ -128,24 +246,14 @@ Bool noRenderExtension = FALSE;
|
|||
#include <errno.h>
|
||||
|
||||
Bool CoreDump;
|
||||
Bool noTestExtensions;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
Bool noPanoramiXExtension = TRUE;
|
||||
Bool PanoramiXVisibilityNotifySent = FALSE;
|
||||
Bool PanoramiXMapped = FALSE;
|
||||
Bool PanoramiXWindowExposureSent = FALSE;
|
||||
Bool PanoramiXOneExposeRequest = FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef XEVIE
|
||||
Bool noXevieExtension = TRUE;
|
||||
#endif
|
||||
|
||||
#ifdef COMPOSITE
|
||||
Bool noCompositeExtension = TRUE;
|
||||
#endif
|
||||
|
||||
int auditTrailLevel = 1;
|
||||
|
||||
Bool Must_have_memory = FALSE;
|
||||
|
|
@ -553,7 +661,7 @@ void UseMsg(void)
|
|||
ErrorF("-v screen-saver without video blanking\n");
|
||||
ErrorF("-wm WhenMapped default backing-store\n");
|
||||
ErrorF("-x string loads named extension at init time \n");
|
||||
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
|
||||
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
|
||||
#ifdef PANORAMIX
|
||||
ErrorF("+xinerama Enable XINERAMA extension\n");
|
||||
ErrorF("-xinerama Disable XINERAMA extension\n");
|
||||
|
|
@ -900,11 +1008,11 @@ ProcessCommandLine(int argc, char *argv[])
|
|||
defaultBackingStore = WhenMapped;
|
||||
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
|
||||
if(++i < argc) {
|
||||
int reqSizeArg = atoi(argv[i]);
|
||||
long reqSizeArg = atol(argv[i]);
|
||||
|
||||
/* Request size > 128MB does not make much sense... */
|
||||
if( reqSizeArg > 0 && reqSizeArg < 128 ) {
|
||||
maxBigRequestSize = (reqSizeArg * 1048576) - 1;
|
||||
if( reqSizeArg > 0L && reqSizeArg < 128L ) {
|
||||
maxBigRequestSize = (reqSizeArg * 1048576L) - 1L;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue