Merge remote branch 'jamey/reviewed'
This commit is contained in:
commit
c768cdda92
|
@ -1170,6 +1170,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
||||||
FontPathElementPtr fpe;
|
FontPathElementPtr fpe;
|
||||||
GC *origGC = NULL;
|
GC *origGC = NULL;
|
||||||
|
int itemSize = c->reqType == X_PolyText8 ? 1 : 2;
|
||||||
|
|
||||||
if (client->clientGone)
|
if (client->clientGone)
|
||||||
{
|
{
|
||||||
|
@ -1255,10 +1256,6 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
val.ptr = pFont;
|
val.ptr = pFont;
|
||||||
ChangeGC(NullClient, c->pGC, GCFont, &val);
|
ChangeGC(NullClient, c->pGC, GCFont, &val);
|
||||||
ValidateGC(c->pDraw, c->pGC);
|
ValidateGC(c->pDraw, c->pGC);
|
||||||
if (c->reqType == X_PolyText8)
|
|
||||||
c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8;
|
|
||||||
else
|
|
||||||
c->polyText = (PolyTextPtr) c->pGC->ops->PolyText16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Undo the refcnt++ we performed when going to sleep */
|
/* Undo the refcnt++ we performed when going to sleep */
|
||||||
|
@ -1270,7 +1267,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
else /* print a string */
|
else /* print a string */
|
||||||
{
|
{
|
||||||
unsigned char *pNextElt;
|
unsigned char *pNextElt;
|
||||||
pNextElt = c->pElt + TextEltHeader + (*c->pElt)*c->itemSize;
|
pNextElt = c->pElt + TextEltHeader + (*c->pElt) * itemSize;
|
||||||
if ( pNextElt > c->endReq)
|
if ( pNextElt > c->endReq)
|
||||||
{
|
{
|
||||||
err = BadLength;
|
err = BadLength;
|
||||||
|
@ -1283,7 +1280,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
}
|
}
|
||||||
if (c->pDraw)
|
if (c->pDraw)
|
||||||
{
|
{
|
||||||
lgerr = LoadGlyphs(client, c->pGC->font, *c->pElt, c->itemSize,
|
lgerr = LoadGlyphs(client, c->pGC->font, *c->pElt, itemSize,
|
||||||
c->pElt + TextEltHeader);
|
c->pElt + TextEltHeader);
|
||||||
}
|
}
|
||||||
else lgerr = Successful;
|
else lgerr = Successful;
|
||||||
|
@ -1381,8 +1378,12 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
if (c->pDraw)
|
if (c->pDraw)
|
||||||
{
|
{
|
||||||
c->xorg += *((INT8 *)(c->pElt + 1)); /* must be signed */
|
c->xorg += *((INT8 *)(c->pElt + 1)); /* must be signed */
|
||||||
c->xorg = (* c->polyText)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
if (c->reqType == X_PolyText8)
|
||||||
*c->pElt, c->pElt + TextEltHeader);
|
c->xorg = (* c->pGC->ops->PolyText8)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
||||||
|
*c->pElt, (char *) (c->pElt + TextEltHeader));
|
||||||
|
else
|
||||||
|
c->xorg = (* c->pGC->ops->PolyText16)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
||||||
|
*c->pElt, (unsigned short *) (c->pElt + TextEltHeader));
|
||||||
}
|
}
|
||||||
c->pElt = pNextElt;
|
c->pElt = pNextElt;
|
||||||
}
|
}
|
||||||
|
@ -1442,16 +1443,7 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt,
|
||||||
local_closure.pDraw = pDraw;
|
local_closure.pDraw = pDraw;
|
||||||
local_closure.xorg = xorg;
|
local_closure.xorg = xorg;
|
||||||
local_closure.yorg = yorg;
|
local_closure.yorg = yorg;
|
||||||
if ((local_closure.reqType = reqType) == X_PolyText8)
|
local_closure.reqType = reqType;
|
||||||
{
|
|
||||||
local_closure.polyText = (PolyTextPtr) pGC->ops->PolyText8;
|
|
||||||
local_closure.itemSize = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
local_closure.polyText = (PolyTextPtr) pGC->ops->PolyText16;
|
|
||||||
local_closure.itemSize = 2;
|
|
||||||
}
|
|
||||||
local_closure.pGC = pGC;
|
local_closure.pGC = pGC;
|
||||||
local_closure.did = did;
|
local_closure.did = did;
|
||||||
local_closure.err = Success;
|
local_closure.err = Success;
|
||||||
|
@ -1469,6 +1461,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
{
|
{
|
||||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||||
FontPathElementPtr fpe;
|
FontPathElementPtr fpe;
|
||||||
|
int itemSize = c->reqType == X_ImageText8 ? 1 : 2;
|
||||||
|
|
||||||
if (client->clientGone)
|
if (client->clientGone)
|
||||||
{
|
{
|
||||||
|
@ -1493,7 +1486,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, c->itemSize, c->data);
|
lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, itemSize, c->data);
|
||||||
if (lgerr == Suspended)
|
if (lgerr == Suspended)
|
||||||
{
|
{
|
||||||
if (!ClientIsAsleep(client)) {
|
if (!ClientIsAsleep(client)) {
|
||||||
|
@ -1515,14 +1508,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
*new_closure = *c;
|
*new_closure = *c;
|
||||||
c = new_closure;
|
c = new_closure;
|
||||||
|
|
||||||
data = malloc(c->nChars * c->itemSize);
|
data = malloc(c->nChars * itemSize);
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
free(c);
|
free(c);
|
||||||
err = BadAlloc;
|
err = BadAlloc;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
memmove(data, c->data, c->nChars * c->itemSize);
|
memmove(data, c->data, c->nChars * itemSize);
|
||||||
c->data = data;
|
c->data = data;
|
||||||
|
|
||||||
pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen);
|
pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen);
|
||||||
|
@ -1562,8 +1555,12 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||||
}
|
}
|
||||||
if (c->pDraw)
|
if (c->pDraw)
|
||||||
{
|
{
|
||||||
(* c->imageText)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
if (c->reqType == X_ImageText8)
|
||||||
c->nChars, c->data);
|
(* c->pGC->ops->ImageText8)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
||||||
|
c->nChars, (char *) c->data);
|
||||||
|
else
|
||||||
|
(* c->pGC->ops->ImageText16)(c->pDraw, c->pGC, c->xorg, c->yorg,
|
||||||
|
c->nChars, (unsigned short *) c->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
|
@ -1601,16 +1598,7 @@ ImageText(ClientPtr client, DrawablePtr pDraw, GC *pGC, int nChars,
|
||||||
local_closure.data = data;
|
local_closure.data = data;
|
||||||
local_closure.xorg = xorg;
|
local_closure.xorg = xorg;
|
||||||
local_closure.yorg = yorg;
|
local_closure.yorg = yorg;
|
||||||
if ((local_closure.reqType = reqType) == X_ImageText8)
|
local_closure.reqType = reqType;
|
||||||
{
|
|
||||||
local_closure.imageText = (ImageTextPtr) pGC->ops->ImageText8;
|
|
||||||
local_closure.itemSize = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
local_closure.imageText = (ImageTextPtr) pGC->ops->ImageText16;
|
|
||||||
local_closure.itemSize = 2;
|
|
||||||
}
|
|
||||||
local_closure.did = did;
|
local_closure.did = did;
|
||||||
|
|
||||||
(void) doImageText(client, &local_closure);
|
(void) doImageText(client, &local_closure);
|
||||||
|
|
6
dix/gc.c
6
dix/gc.c
|
@ -527,8 +527,6 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
|
||||||
pGC->numInDashList = 2;
|
pGC->numInDashList = 2;
|
||||||
pGC->dash = DefaultDash;
|
pGC->dash = DefaultDash;
|
||||||
pGC->dashOffset = 0;
|
pGC->dashOffset = 0;
|
||||||
pGC->lastWinOrg.x = 0;
|
|
||||||
pGC->lastWinOrg.y = 0;
|
|
||||||
|
|
||||||
/* use the default font and stipple */
|
/* use the default font and stipple */
|
||||||
pGC->font = defaultFont;
|
pGC->font = defaultFont;
|
||||||
|
@ -801,7 +799,7 @@ is what fills the default tile. (maybe this comment should
|
||||||
go with CreateGC() or ChangeGC().)
|
go with CreateGC() or ChangeGC().)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GCPtr
|
static GCPtr
|
||||||
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||||
{
|
{
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
@ -841,8 +839,6 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||||
pGC->dashOffset = 0;
|
pGC->dashOffset = 0;
|
||||||
pGC->numInDashList = 2;
|
pGC->numInDashList = 2;
|
||||||
pGC->dash = DefaultDash;
|
pGC->dash = DefaultDash;
|
||||||
pGC->lastWinOrg.x = 0;
|
|
||||||
pGC->lastWinOrg.y = 0;
|
|
||||||
|
|
||||||
/* scratch GCs in the GCperDepth pool start off unused */
|
/* scratch GCs in the GCperDepth pool start off unused */
|
||||||
pGC->scratch_inuse = FALSE;
|
pGC->scratch_inuse = FALSE;
|
||||||
|
|
1
fb/fb.h
1
fb/fb.h
|
@ -666,7 +666,6 @@ typedef struct {
|
||||||
FbBits bgand, bgxor; /* for stipples */
|
FbBits bgand, bgxor; /* for stipples */
|
||||||
FbBits fg, bg, pm; /* expanded and filled */
|
FbBits fg, bg, pm; /* expanded and filled */
|
||||||
unsigned int dashLength; /* total of all dash elements */
|
unsigned int dashLength; /* total of all dash elements */
|
||||||
unsigned char oneRect; /* clip list is single rectangle */
|
|
||||||
unsigned char evenStipple; /* stipple is even */
|
unsigned char evenStipple; /* stipple is even */
|
||||||
unsigned char bpp; /* current drawable bpp */
|
unsigned char bpp; /* current drawable bpp */
|
||||||
} FbGCPrivRec, *FbGCPrivPtr;
|
} FbGCPrivRec, *FbGCPrivPtr;
|
||||||
|
|
12
fb/fbgc.c
12
fb/fbgc.c
|
@ -64,19 +64,13 @@ const GCOps fbGCOps = {
|
||||||
Bool
|
Bool
|
||||||
fbCreateGC(GCPtr pGC)
|
fbCreateGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
pGC->clientClip = NULL;
|
|
||||||
pGC->clientClipType = CT_NONE;
|
|
||||||
|
|
||||||
pGC->ops = (GCOps *) &fbGCOps;
|
pGC->ops = (GCOps *) &fbGCOps;
|
||||||
pGC->funcs = (GCFuncs *) &fbGCFuncs;
|
pGC->funcs = (GCFuncs *) &fbGCFuncs;
|
||||||
|
|
||||||
/* fb wants to translate before scan conversion */
|
/* fb wants to translate before scan conversion */
|
||||||
pGC->miTranslate = 1;
|
pGC->miTranslate = 1;
|
||||||
|
pGC->fExpose = 1;
|
||||||
|
|
||||||
fbGetRotatedPixmap(pGC) = 0;
|
|
||||||
fbGetExpose(pGC) = 1;
|
|
||||||
fbGetFreeCompClip(pGC) = 0;
|
|
||||||
fbGetCompositeClip(pGC) = 0;
|
|
||||||
fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth);
|
fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -199,9 +193,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
||||||
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
|
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
|
||||||
FbBits mask;
|
FbBits mask;
|
||||||
|
|
||||||
pGC->lastWinOrg.x = pDrawable->x;
|
|
||||||
pGC->lastWinOrg.y = pDrawable->y;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if the client clip is different or moved OR the subwindowMode has
|
* if the client clip is different or moved OR the subwindowMode has
|
||||||
* changed OR the window's clip has changed since the last validation
|
* changed OR the window's clip has changed since the last validation
|
||||||
|
@ -213,7 +204,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
miComputeCompositeClip (pGC, pDrawable);
|
miComputeCompositeClip (pGC, pDrawable);
|
||||||
pPriv->oneRect = RegionNumRects(fbGetCompositeClip(pGC)) == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FB_24_32BIT
|
#ifdef FB_24_32BIT
|
||||||
|
|
|
@ -99,8 +99,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
|
||||||
|
|
||||||
(*core->destroyDrawable)(private->driDrawable);
|
(*core->destroyDrawable)(private->driDrawable);
|
||||||
|
|
||||||
FreeScratchGC(private->gc);
|
FreeGC(private->gc, (GContext)0);
|
||||||
FreeScratchGC(private->swapgc);
|
FreeGC(private->swapgc, (GContext)0);
|
||||||
|
|
||||||
__glXDrawableRelease(drawable);
|
__glXDrawableRelease(drawable);
|
||||||
|
|
||||||
|
@ -301,13 +301,12 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
|
||||||
XID glxDrawId,
|
XID glxDrawId,
|
||||||
__GLXconfig *glxConfig)
|
__GLXconfig *glxConfig)
|
||||||
{
|
{
|
||||||
ChangeGCVal gcvals[2];
|
XID gcvals[2];
|
||||||
|
int status;
|
||||||
__GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
|
__GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
|
||||||
__GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
|
__GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
|
||||||
__GLXDRIdrawable *private;
|
__GLXDRIdrawable *private;
|
||||||
|
|
||||||
ScreenPtr pScreen = driScreen->base.pScreen;
|
|
||||||
|
|
||||||
private = calloc(1, sizeof *private);
|
private = calloc(1, sizeof *private);
|
||||||
if (private == NULL)
|
if (private == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -323,13 +322,10 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
|
||||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||||
|
|
||||||
private->gc = CreateScratchGC(pScreen, pDraw->depth);
|
gcvals[0] = GXcopy;
|
||||||
private->swapgc = CreateScratchGC(pScreen, pDraw->depth);
|
private->gc = CreateGC(pDraw, GCFunction, gcvals, &status, (XID)0, serverClient);
|
||||||
|
gcvals[1] = FALSE;
|
||||||
gcvals[0].val = GXcopy;
|
private->swapgc = CreateGC(pDraw, GCFunction | GCGraphicsExposures, gcvals, &status, (XID)0, serverClient);
|
||||||
ChangeGC(NullClient, private->gc, GCFunction, gcvals);
|
|
||||||
gcvals[1].val = FALSE;
|
|
||||||
ChangeGC(NullClient, private->swapgc, GCFunction | GCGraphicsExposures, gcvals);
|
|
||||||
|
|
||||||
private->driDrawable =
|
private->driDrawable =
|
||||||
(*driScreen->swrast->createNewDrawable)(driScreen->driScreen,
|
(*driScreen->swrast->createNewDrawable)(driScreen->driScreen,
|
||||||
|
|
|
@ -69,12 +69,6 @@
|
||||||
#include "dmx_glxvisuals.h"
|
#include "dmx_glxvisuals.h"
|
||||||
#include <X11/extensions/Xext.h>
|
#include <X11/extensions/Xext.h>
|
||||||
#include <X11/extensions/extutil.h>
|
#include <X11/extensions/extutil.h>
|
||||||
|
|
||||||
extern void GlxSetVisualConfigs(
|
|
||||||
int nconfigs,
|
|
||||||
__GLXvisualConfig *configs,
|
|
||||||
void **configprivs
|
|
||||||
);
|
|
||||||
#endif /* GLXEXT */
|
#endif /* GLXEXT */
|
||||||
|
|
||||||
/* Global variables available to all Xserver/hw/dmx routines. */
|
/* Global variables available to all Xserver/hw/dmx routines. */
|
||||||
|
@ -768,9 +762,6 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hand out the glx configs to glx extension */
|
|
||||||
GlxSetVisualConfigs(nconfigs, configs, (void**)configprivs);
|
|
||||||
|
|
||||||
XFlush(dmxScreen->beDisplay);
|
XFlush(dmxScreen->beDisplay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
#include "dmxfont.h"
|
#include "dmxfont.h"
|
||||||
#include "dmxsync.h"
|
#include "dmxsync.h"
|
||||||
|
|
||||||
#undef Xmalloc
|
|
||||||
#undef Xcalloc
|
|
||||||
#undef Xrealloc
|
|
||||||
#undef Xfree
|
|
||||||
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include <GL/glxtokens.h>
|
#include <GL/glxtokens.h>
|
||||||
#include "g_disptab.h"
|
#include "g_disptab.h"
|
||||||
|
@ -144,7 +139,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
/*
|
/*
|
||||||
** Allocate memory for the new context
|
** Allocate memory for the new context
|
||||||
*/
|
*/
|
||||||
glxc = __glXCalloc(1, sizeof(__GLXcontext));
|
glxc = calloc(1, sizeof(__GLXcontext));
|
||||||
if (!glxc) {
|
if (!glxc) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +151,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
|
glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
|
||||||
if (!glxc->pFBConfig) {
|
if (!glxc->pFBConfig) {
|
||||||
client->errorValue = fbconfigId;
|
client->errorValue = fbconfigId;
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
visual = glxc->pFBConfig->associatedVisualId;
|
visual = glxc->pFBConfig->associatedVisualId;
|
||||||
|
@ -177,7 +172,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
}
|
}
|
||||||
if (i == pScreen->numVisuals) {
|
if (i == pScreen->numVisuals) {
|
||||||
client->errorValue = visual;
|
client->errorValue = visual;
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +187,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
** Visual not support on this screen by this OpenGL implementation.
|
** Visual not support on this screen by this OpenGL implementation.
|
||||||
*/
|
*/
|
||||||
client->errorValue = visual;
|
client->errorValue = visual;
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +198,7 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
/*
|
/*
|
||||||
* visual does not have an FBConfig ???
|
* visual does not have an FBConfig ???
|
||||||
client->errorValue = visual;
|
client->errorValue = visual;
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -223,11 +218,11 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
* allocate memory for back-end servers info
|
* allocate memory for back-end servers info
|
||||||
*/
|
*/
|
||||||
num_be_screens = to_screen - from_screen + 1;
|
num_be_screens = to_screen - from_screen + 1;
|
||||||
glxc->real_ids = (XID *)__glXMalloc(sizeof(XID) * num_be_screens);
|
glxc->real_ids = (XID *)malloc(sizeof(XID) * num_be_screens);
|
||||||
if (!glxc->real_ids) {
|
if (!glxc->real_ids) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
glxc->real_vids = (XID *)__glXMalloc(sizeof(XID) * num_be_screens);
|
glxc->real_vids = (XID *)malloc(sizeof(XID) * num_be_screens);
|
||||||
if (!glxc->real_vids) {
|
if (!glxc->real_vids) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
@ -252,9 +247,9 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
|
|
||||||
if (!be_vid) {
|
if (!be_vid) {
|
||||||
/* visual is not supported on the back-end server */
|
/* visual is not supported on the back-end server */
|
||||||
__glXFree( glxc->real_ids );
|
free( glxc->real_ids );
|
||||||
__glXFree( glxc->real_vids );
|
free( glxc->real_vids );
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,9 +341,9 @@ static int CreateContext(__GLXclientState *cl,
|
||||||
** Register this context as a resource.
|
** Register this context as a resource.
|
||||||
*/
|
*/
|
||||||
if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
|
if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
|
||||||
__glXFree( glxc->real_ids );
|
free( glxc->real_ids );
|
||||||
__glXFree( glxc->real_vids );
|
free( glxc->real_vids );
|
||||||
__glXFree( glxc );
|
free( glxc );
|
||||||
client->errorValue = gcId;
|
client->errorValue = gcId;
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
@ -585,16 +580,16 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawableP
|
||||||
** Didn't find a free slot, so we'll have to grow the table.
|
** Didn't find a free slot, so we'll have to grow the table.
|
||||||
*/
|
*/
|
||||||
if (!num) {
|
if (!num) {
|
||||||
table = (__GLXcontext **) __glXMalloc(sizeof(__GLXcontext *));
|
table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
|
||||||
cl->currentDrawables = (DrawablePtr *) __glXMalloc(sizeof(DrawablePtr));
|
cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
|
||||||
cl->be_currentCTag = (GLXContextTag *) __glXMalloc(screenInfo.numScreens *sizeof(GLXContextTag));
|
cl->be_currentCTag = (GLXContextTag *) malloc(screenInfo.numScreens *sizeof(GLXContextTag));
|
||||||
} else {
|
} else {
|
||||||
table = (__GLXcontext **) __glXRealloc(table,
|
table = (__GLXcontext **) realloc(table,
|
||||||
(num+1)*sizeof(__GLXcontext *));
|
(num+1)*sizeof(__GLXcontext *));
|
||||||
cl->currentDrawables = (DrawablePtr *) __glXRealloc(
|
cl->currentDrawables = (DrawablePtr *) realloc(
|
||||||
cl->currentDrawables ,
|
cl->currentDrawables ,
|
||||||
(num+1)*sizeof(DrawablePtr));
|
(num+1)*sizeof(DrawablePtr));
|
||||||
cl->be_currentCTag = (GLXContextTag *) __glXRealloc(cl->be_currentCTag,
|
cl->be_currentCTag = (GLXContextTag *) realloc(cl->be_currentCTag,
|
||||||
(num+1)*screenInfo.numScreens*sizeof(GLXContextTag));
|
(num+1)*screenInfo.numScreens*sizeof(GLXContextTag));
|
||||||
}
|
}
|
||||||
table[num] = glxc;
|
table[num] = glxc;
|
||||||
|
@ -1721,13 +1716,13 @@ static int CreateGLXPixmap(__GLXclientState *cl,
|
||||||
pGlxVisual = NULL;
|
pGlxVisual = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pGlxPixmap = (__GLXpixmap *) __glXMalloc(sizeof(__GLXpixmap));
|
pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
|
||||||
if (!pGlxPixmap) {
|
if (!pGlxPixmap) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
pGlxPixmap->be_xids = (XID *) __glXMalloc(sizeof(XID) * screenInfo.numScreens);
|
pGlxPixmap->be_xids = (XID *) malloc(sizeof(XID) * screenInfo.numScreens);
|
||||||
if (!pGlxPixmap->be_xids) {
|
if (!pGlxPixmap->be_xids) {
|
||||||
__glXFree( pGlxPixmap );
|
free( pGlxPixmap );
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1832,7 +1827,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
client->errorValue = ( visual ? visual : fbconfigId );
|
client->errorValue = ( visual ? visual : fbconfigId );
|
||||||
__glXFree( pGlxPixmap );
|
free( pGlxPixmap );
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1840,7 +1835,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
|
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
|
||||||
__glXFree( pGlxPixmap );
|
free( pGlxPixmap );
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2570,7 +2565,7 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
|
||||||
cl->GLClientmajorVersion = req->major;
|
cl->GLClientmajorVersion = req->major;
|
||||||
cl->GLClientminorVersion = req->minor;
|
cl->GLClientminorVersion = req->minor;
|
||||||
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
if (cl->GLClientextensions) free(cl->GLClientextensions);
|
||||||
buf = (const char *)(req+1);
|
buf = (const char *)(req+1);
|
||||||
cl->GLClientextensions = strdup(buf);
|
cl->GLClientextensions = strdup(buf);
|
||||||
|
|
||||||
|
|
|
@ -702,9 +702,9 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
|
||||||
*/
|
*/
|
||||||
if (cl->largeCmdBufSize < hdr->length) {
|
if (cl->largeCmdBufSize < hdr->length) {
|
||||||
if (!cl->largeCmdBuf) {
|
if (!cl->largeCmdBuf) {
|
||||||
cl->largeCmdBuf = (GLbyte *) __glXMalloc(hdr->length);
|
cl->largeCmdBuf = (GLbyte *) malloc(hdr->length);
|
||||||
} else {
|
} else {
|
||||||
cl->largeCmdBuf = (GLbyte *) __glXRealloc(cl->largeCmdBuf, hdr->length);
|
cl->largeCmdBuf = (GLbyte *) realloc(cl->largeCmdBuf, hdr->length);
|
||||||
}
|
}
|
||||||
if (!cl->largeCmdBuf) {
|
if (!cl->largeCmdBuf) {
|
||||||
cl->largeCmdRequestsTotal = 0;
|
cl->largeCmdRequestsTotal = 0;
|
||||||
|
|
|
@ -77,10 +77,10 @@ static void ResetClientState(int clientIndex)
|
||||||
Display **keep_be_displays;
|
Display **keep_be_displays;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cl->returnBuf) __glXFree(cl->returnBuf);
|
if (cl->returnBuf) free(cl->returnBuf);
|
||||||
if (cl->currentContexts) __glXFree(cl->currentContexts);
|
if (cl->currentContexts) free(cl->currentContexts);
|
||||||
if (cl->currentDrawables) __glXFree(cl->currentDrawables);
|
if (cl->currentDrawables) free(cl->currentDrawables);
|
||||||
if (cl->largeCmdBuf) __glXFree(cl->largeCmdBuf);
|
if (cl->largeCmdBuf) free(cl->largeCmdBuf);
|
||||||
|
|
||||||
for (i=0; i< screenInfo.numScreens; i++) {
|
for (i=0; i< screenInfo.numScreens; i++) {
|
||||||
if (cl->be_displays[i])
|
if (cl->be_displays[i])
|
||||||
|
@ -97,7 +97,7 @@ static void ResetClientState(int clientIndex)
|
||||||
*/
|
*/
|
||||||
cl->GLClientmajorVersion = 1;
|
cl->GLClientmajorVersion = 1;
|
||||||
cl->GLClientminorVersion = 0;
|
cl->GLClientminorVersion = 0;
|
||||||
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
|
if (cl->GLClientextensions) free(cl->GLClientextensions);
|
||||||
|
|
||||||
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
||||||
}
|
}
|
||||||
|
@ -167,8 +167,8 @@ void __glXFreeGLXPixmap( __GLXpixmap *pGlxPixmap )
|
||||||
** only if it's zero.
|
** only if it's zero.
|
||||||
*/
|
*/
|
||||||
(*pGlxPixmap->pScreen->DestroyPixmap)(pPixmap);
|
(*pGlxPixmap->pScreen->DestroyPixmap)(pPixmap);
|
||||||
__glXFree(pGlxPixmap->be_xids);
|
free(pGlxPixmap->be_xids);
|
||||||
__glXFree(pGlxPixmap);
|
free(pGlxPixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -222,10 +222,10 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
|
||||||
{
|
{
|
||||||
if (cx->idExists || cx->isCurrent) return GL_FALSE;
|
if (cx->idExists || cx->isCurrent) return GL_FALSE;
|
||||||
|
|
||||||
if (cx->feedbackBuf) __glXFree(cx->feedbackBuf);
|
if (cx->feedbackBuf) free(cx->feedbackBuf);
|
||||||
if (cx->selectBuf) __glXFree(cx->selectBuf);
|
if (cx->selectBuf) free(cx->selectBuf);
|
||||||
if (cx->real_ids) __glXFree(cx->real_ids);
|
if (cx->real_ids) free(cx->real_ids);
|
||||||
if (cx->real_vids) __glXFree(cx->real_vids);
|
if (cx->real_vids) free(cx->real_vids);
|
||||||
|
|
||||||
if (cx->pGlxPixmap) {
|
if (cx->pGlxPixmap) {
|
||||||
/*
|
/*
|
||||||
|
@ -263,7 +263,7 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
|
||||||
cx->pGlxReadWindow = 0;
|
cx->pGlxReadWindow = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXFree(cx);
|
free(cx);
|
||||||
|
|
||||||
if (cx == __glXLastContext) {
|
if (cx == __glXLastContext) {
|
||||||
__glXFlushContextCache();
|
__glXFlushContextCache();
|
||||||
|
@ -367,46 +367,6 @@ Bool __glXCoreType(void)
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
void GlxSetVisualConfigs(int nconfigs,
|
|
||||||
__GLXvisualConfig *configs, void **privates)
|
|
||||||
{
|
|
||||||
glxSetVisualConfigs(nconfigs, configs, privates);
|
|
||||||
}
|
|
||||||
|
|
||||||
static miInitVisualsProcPtr saveInitVisualsProc;
|
|
||||||
|
|
||||||
Bool GlxInitVisuals(VisualPtr *visualp, DepthPtr *depthp,
|
|
||||||
int *nvisualp, int *ndepthp,
|
|
||||||
int *rootDepthp, VisualID *defaultVisp,
|
|
||||||
unsigned long sizes, int bitsPerRGB,
|
|
||||||
int preferredVis)
|
|
||||||
{
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
if (saveInitVisualsProc) {
|
|
||||||
ret = saveInitVisualsProc(visualp, depthp, nvisualp, ndepthp,
|
|
||||||
rootDepthp, defaultVisp, sizes, bitsPerRGB,
|
|
||||||
preferredVis);
|
|
||||||
if (!ret)
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
glxInitVisuals(nvisualp, visualp, defaultVisp, *ndepthp, *depthp,*rootDepthp);
|
|
||||||
|
|
||||||
return True;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
GlxWrapInitVisuals(miInitVisualsProcPtr *initVisProc)
|
|
||||||
{
|
|
||||||
if (dmxGLXProxy) {
|
|
||||||
saveInitVisualsProc = *initVisProc;
|
|
||||||
*initVisProc = GlxInitVisuals;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
|
|
||||||
void __glXFlushContextCache(void)
|
void __glXFlushContextCache(void)
|
||||||
{
|
{
|
||||||
__glXLastContext = 0;
|
__glXLastContext = 0;
|
||||||
|
@ -427,15 +387,15 @@ static int __glXDispatch(ClientPtr client)
|
||||||
opcode = stuff->glxCode;
|
opcode = stuff->glxCode;
|
||||||
cl = __glXClients[client->index];
|
cl = __glXClients[client->index];
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
cl = __glXCalloc(1, sizeof(__GLXclientState));
|
cl = calloc(1, sizeof(__GLXclientState));
|
||||||
__glXClients[client->index] = cl;
|
__glXClients[client->index] = cl;
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl->be_displays = __glXCalloc(screenInfo.numScreens, sizeof(Display *));
|
cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
|
||||||
if (!cl->be_displays) {
|
if (!cl->be_displays) {
|
||||||
__glXFree( cl );
|
free( cl );
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -479,15 +439,15 @@ static int __glXSwapDispatch(ClientPtr client)
|
||||||
opcode = stuff->glxCode;
|
opcode = stuff->glxCode;
|
||||||
cl = __glXClients[client->index];
|
cl = __glXClients[client->index];
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
cl = __glXCalloc(1, sizeof(__GLXclientState));
|
cl = calloc(1, sizeof(__GLXclientState));
|
||||||
__glXClients[client->index] = cl;
|
__glXClients[client->index] = cl;
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl->be_displays = __glXCalloc(screenInfo.numScreens, sizeof(Display *));
|
cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
|
||||||
if (!cl->be_displays) {
|
if (!cl->be_displays) {
|
||||||
__glXFree( cl );
|
free( cl );
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,19 +74,5 @@ extern void GlxExtensionInit(void);
|
||||||
|
|
||||||
extern Bool __glXCoreType(void);
|
extern Bool __glXCoreType(void);
|
||||||
|
|
||||||
extern int GlxInitVisuals(
|
|
||||||
#if NeedFunctionPrototypes
|
|
||||||
VisualPtr * visualp,
|
|
||||||
DepthPtr * depthp,
|
|
||||||
int * nvisualp,
|
|
||||||
int * ndepthp,
|
|
||||||
int * rootDepthp,
|
|
||||||
VisualID * defaultVisp,
|
|
||||||
unsigned long sizes,
|
|
||||||
int bitsPerRGB,
|
|
||||||
int preferredVis
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif /* _glxext_h_ */
|
#endif /* _glxext_h_ */
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
#include "dmx.h"
|
#include "dmx.h"
|
||||||
#include "dmxlog.h"
|
#include "dmxlog.h"
|
||||||
|
|
||||||
#undef Xmalloc
|
|
||||||
#undef Xcalloc
|
|
||||||
#undef Xrealloc
|
|
||||||
#undef Xfree
|
|
||||||
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
|
|
||||||
#include <windowstr.h>
|
#include <windowstr.h>
|
||||||
|
|
|
@ -39,11 +39,6 @@
|
||||||
#include "dmxfont.h"
|
#include "dmxfont.h"
|
||||||
#include "dmxcb.h"
|
#include "dmxcb.h"
|
||||||
|
|
||||||
#undef Xmalloc
|
|
||||||
#undef Xcalloc
|
|
||||||
#undef Xrealloc
|
|
||||||
#undef Xfree
|
|
||||||
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "g_disptab.h"
|
#include "g_disptab.h"
|
||||||
|
|
|
@ -29,81 +29,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include <GL/glxtokens.h>
|
|
||||||
#include <pixmapstr.h>
|
|
||||||
#include <windowstr.h>
|
|
||||||
#include "glxutil.h"
|
#include "glxutil.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
|
|
||||||
void __glXNop(void) {}
|
void __glXNop(void) {}
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
|
|
||||||
/* Memory Allocation for GLX */
|
|
||||||
|
|
||||||
void *
|
|
||||||
__glXMalloc(size_t size)
|
|
||||||
{
|
|
||||||
void *addr;
|
|
||||||
|
|
||||||
if (size == 0) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
addr = malloc(size);
|
|
||||||
if (addr == NULL) {
|
|
||||||
/* XXX: handle out of memory error */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
__glXCalloc(size_t numElements, size_t elementSize)
|
|
||||||
{
|
|
||||||
void *addr;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
if ((numElements == 0) || (elementSize == 0)) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
addr = calloc(numElements, elementSize);
|
|
||||||
if (addr == NULL) {
|
|
||||||
/* XXX: handle out of memory error */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
__glXRealloc(void *addr, size_t newSize)
|
|
||||||
{
|
|
||||||
void *newAddr;
|
|
||||||
|
|
||||||
if (addr) {
|
|
||||||
if (newSize == 0) {
|
|
||||||
free(addr);
|
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
newAddr = realloc(addr, newSize);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (newSize == 0) {
|
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
newAddr = malloc(newSize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (newAddr == NULL) {
|
|
||||||
return NULL; /* XXX: out of memory */
|
|
||||||
}
|
|
||||||
|
|
||||||
return newAddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
__glXFree(void *addr)
|
|
||||||
{
|
|
||||||
free(addr);
|
|
||||||
}
|
|
||||||
|
|
|
@ -33,12 +33,6 @@
|
||||||
|
|
||||||
extern void __glXNop(void);
|
extern void __glXNop(void);
|
||||||
|
|
||||||
/* memory management */
|
|
||||||
extern void *__glXMalloc(size_t size);
|
|
||||||
extern void *__glXCalloc(size_t numElements, size_t elementSize);
|
|
||||||
extern void *__glXRealloc(void *addr, size_t newSize);
|
|
||||||
extern void __glXFree(void *ptr);
|
|
||||||
|
|
||||||
/* context helper routines */
|
/* context helper routines */
|
||||||
extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
|
extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
|
||||||
extern DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag);
|
extern DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag);
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
#include "dmxpixmap.h"
|
#include "dmxpixmap.h"
|
||||||
#include "dmxfont.h"
|
#include "dmxfont.h"
|
||||||
|
|
||||||
#undef Xmalloc
|
|
||||||
#undef Xcalloc
|
|
||||||
#undef Xrealloc
|
|
||||||
#undef Xfree
|
|
||||||
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "g_disptab.h"
|
#include "g_disptab.h"
|
||||||
|
|
|
@ -32,16 +32,8 @@
|
||||||
#include <dmx-config.h>
|
#include <dmx-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include "dmx.h"
|
|
||||||
#include "glxserver.h"
|
#include "glxserver.h"
|
||||||
#include "glxutil.h"
|
#include "glxvisuals.h"
|
||||||
#include "dmx_glxvisuals.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
static int numConfigs = 0;
|
|
||||||
static __GLXvisualConfig *visualConfigs = NULL;
|
|
||||||
static void **visualPrivates = NULL;
|
|
||||||
|
|
||||||
int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 )
|
int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 )
|
||||||
{
|
{
|
||||||
|
@ -158,381 +150,3 @@ VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatch
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void glxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
|
|
||||||
void **privates)
|
|
||||||
{
|
|
||||||
numConfigs = nconfigs;
|
|
||||||
visualConfigs = configs;
|
|
||||||
visualPrivates = privates;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int count_bits(unsigned int n)
|
|
||||||
{
|
|
||||||
int bits = 0;
|
|
||||||
|
|
||||||
while (n > 0) {
|
|
||||||
if (n & 1) bits++;
|
|
||||||
n >>= 1;
|
|
||||||
}
|
|
||||||
return bits;
|
|
||||||
}
|
|
||||||
|
|
||||||
static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth,
|
|
||||||
DepthPtr pdepth, int ndepths,
|
|
||||||
VisualPtr pNewVisual, int numNewVisuals)
|
|
||||||
{
|
|
||||||
int d, v;
|
|
||||||
VisualPtr vis;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* find the first visual with the same or deeper depth
|
|
||||||
* of the same class.
|
|
||||||
*/
|
|
||||||
for (d=0; d<ndepths; d++) {
|
|
||||||
if (pdepth[d].depth >= rootDepth) {
|
|
||||||
for (v=0; v<pdepth[d].numVids; v++) {
|
|
||||||
|
|
||||||
/* find the new visual structure */
|
|
||||||
vis = pNewVisual;
|
|
||||||
while( pdepth[d].vids[v] != vis->vid ) vis++;
|
|
||||||
|
|
||||||
if (vis->class == pVisual->class) {
|
|
||||||
return pdepth[d].vids[v];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* did not find any.
|
|
||||||
* try to look for the same class only.
|
|
||||||
*/
|
|
||||||
for (d=0; d<ndepths; d++) {
|
|
||||||
for (v=0; v<pdepth[d].numVids; v++) {
|
|
||||||
|
|
||||||
/* find the new visual structure */
|
|
||||||
vis = pNewVisual;
|
|
||||||
while( pdepth[d].vids[v] != vis->vid ) vis++;
|
|
||||||
|
|
||||||
if (vis->class == pVisual->class) {
|
|
||||||
return pdepth[d].vids[v];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if not found - just take the first visual
|
|
||||||
*/
|
|
||||||
return pdepth[0].vids[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool glxInitVisuals(int *nvisualp, VisualPtr *visualp,
|
|
||||||
VisualID *defaultVisp,
|
|
||||||
int ndepth, DepthPtr pdepth,
|
|
||||||
int rootDepth)
|
|
||||||
{
|
|
||||||
int numRGBconfigs;
|
|
||||||
int numCIconfigs;
|
|
||||||
int numVisuals = *nvisualp;
|
|
||||||
int numNewVisuals;
|
|
||||||
int numNewConfigs;
|
|
||||||
VisualPtr pVisual = *visualp;
|
|
||||||
VisualPtr pVisualNew = NULL;
|
|
||||||
VisualID *orig_vid = NULL;
|
|
||||||
__GLXvisualConfig *glXVisualPtr = NULL;
|
|
||||||
__GLXvisualConfig *pNewVisualConfigs = NULL;
|
|
||||||
void **glXVisualPriv;
|
|
||||||
dmxGlxVisualPrivate **pNewVisualPriv;
|
|
||||||
int found_default;
|
|
||||||
int i, j, k;
|
|
||||||
int numGLXvis = 0;
|
|
||||||
GLint *isGLXvis;
|
|
||||||
|
|
||||||
if (numConfigs > 0)
|
|
||||||
numNewConfigs = numConfigs;
|
|
||||||
else
|
|
||||||
return False;
|
|
||||||
|
|
||||||
MAXSCREENSALLOC(__glXActiveScreens);
|
|
||||||
if (!__glXActiveScreens)
|
|
||||||
return False;
|
|
||||||
|
|
||||||
/* Alloc space for the list of new GLX visuals */
|
|
||||||
pNewVisualConfigs = (__GLXvisualConfig *)
|
|
||||||
__glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig));
|
|
||||||
if (!pNewVisualConfigs) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Alloc space for the list of new GLX visual privates */
|
|
||||||
pNewVisualPriv = (dmxGlxVisualPrivate **) __glXMalloc(numNewConfigs * sizeof(dmxGlxVisualPrivate *));
|
|
||||||
if (!pNewVisualPriv) {
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy driver's visual config info */
|
|
||||||
for (i = 0; i < numConfigs; i++) {
|
|
||||||
pNewVisualConfigs[i] = visualConfigs[i];
|
|
||||||
pNewVisualPriv[i] = (dmxGlxVisualPrivate *)visualPrivates[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
/* FIXME: This is a hack to workaround a hang in xtest caused by a
|
|
||||||
* mismatch between what the front end (i.e., DMX) server calculates
|
|
||||||
* for the visual configs and what the back-end servers have.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int numTCRGBconfigs = 0;
|
|
||||||
int numDCRGBconfigs = 0;
|
|
||||||
|
|
||||||
numRGBconfigs = 0;
|
|
||||||
numCIconfigs = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < numNewConfigs; i++) {
|
|
||||||
if (pNewVisualConfigs[i].rgba) {
|
|
||||||
if (pNewVisualConfigs[i].class == TrueColor)
|
|
||||||
numTCRGBconfigs++;
|
|
||||||
else
|
|
||||||
numDCRGBconfigs++;
|
|
||||||
numRGBconfigs++;
|
|
||||||
} else
|
|
||||||
numCIconfigs++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Count the total number of visuals to compute */
|
|
||||||
numNewVisuals = 0;
|
|
||||||
for (i = 0; i < numVisuals; i++) {
|
|
||||||
numNewVisuals +=
|
|
||||||
(pVisual[i].class == TrueColor) ? numTCRGBconfigs :
|
|
||||||
(pVisual[i].class == DirectColor) ? numDCRGBconfigs :
|
|
||||||
numCIconfigs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
/* Count the number of RGB and CI visual configs */
|
|
||||||
numRGBconfigs = 0;
|
|
||||||
numCIconfigs = 0;
|
|
||||||
for (i = 0; i < numNewConfigs; i++) {
|
|
||||||
if (pNewVisualConfigs[i].rgba)
|
|
||||||
numRGBconfigs++;
|
|
||||||
else
|
|
||||||
numCIconfigs++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Count the total number of visuals to compute */
|
|
||||||
numNewVisuals = 0;
|
|
||||||
for (i = 0; i < numVisuals; i++) {
|
|
||||||
numNewVisuals +=
|
|
||||||
(pVisual[i].class == TrueColor || pVisual[i].class == DirectColor)
|
|
||||||
? numRGBconfigs : numCIconfigs;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Reset variables for use with the next screen/driver's visual configs */
|
|
||||||
visualConfigs = NULL;
|
|
||||||
numConfigs = 0;
|
|
||||||
|
|
||||||
/* Alloc temp space for the list of orig VisualIDs for each new visual */
|
|
||||||
orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID));
|
|
||||||
if (!orig_vid) {
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Alloc space for the list of glXVisuals */
|
|
||||||
glXVisualPtr = (__GLXvisualConfig *)__glXMalloc(numNewVisuals *
|
|
||||||
sizeof(__GLXvisualConfig));
|
|
||||||
if (!glXVisualPtr) {
|
|
||||||
__glXFree(orig_vid);
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Alloc space for the list of glXVisualPrivates */
|
|
||||||
glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *));
|
|
||||||
if (!glXVisualPriv) {
|
|
||||||
__glXFree(glXVisualPtr);
|
|
||||||
__glXFree(orig_vid);
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Alloc space for the new list of the X server's visuals */
|
|
||||||
pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec));
|
|
||||||
if (!pVisualNew) {
|
|
||||||
__glXFree(glXVisualPriv);
|
|
||||||
__glXFree(glXVisualPtr);
|
|
||||||
__glXFree(orig_vid);
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
isGLXvis = (GLint *) __glXMalloc(numNewVisuals * sizeof(GLint));
|
|
||||||
if (!isGLXvis) {
|
|
||||||
__glXFree(glXVisualPriv);
|
|
||||||
__glXFree(glXVisualPtr);
|
|
||||||
__glXFree(orig_vid);
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
__glXFree(pVisualNew);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize the new visuals */
|
|
||||||
found_default = FALSE;
|
|
||||||
for (i = j = 0; i < numVisuals; i++) {
|
|
||||||
|
|
||||||
for (k = 0; k < numNewConfigs; k++) {
|
|
||||||
|
|
||||||
int new_depth;
|
|
||||||
int depth;
|
|
||||||
int d,v;
|
|
||||||
|
|
||||||
/* find the depth of the new visual config */
|
|
||||||
new_depth = pNewVisualPriv[k]->x_visual_depth;
|
|
||||||
|
|
||||||
/* find the depth of the original visual */
|
|
||||||
depth = 0;
|
|
||||||
d = 0;
|
|
||||||
while( (depth==0) && (d < ndepth) ) {
|
|
||||||
v = 0;
|
|
||||||
while( (depth==0) && (v < pdepth[d].numVids) ) {
|
|
||||||
if (pdepth[d].vids[v] == pVisual[i].vid) {
|
|
||||||
depth = pdepth[d].depth;
|
|
||||||
}
|
|
||||||
v++;
|
|
||||||
}
|
|
||||||
d++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check that the visual has the same class and depth
|
|
||||||
* as the new config
|
|
||||||
*/
|
|
||||||
if ( pVisual[i].class != pNewVisualPriv[k]->x_visual_class ||
|
|
||||||
(depth != new_depth) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Initialize the new visual */
|
|
||||||
pVisualNew[j] = pVisual[i];
|
|
||||||
pVisualNew[j].vid = FakeClientID(0);
|
|
||||||
|
|
||||||
/* Check for the default visual */
|
|
||||||
if (!found_default && pVisual[i].vid == *defaultVisp) {
|
|
||||||
*defaultVisp = pVisualNew[j].vid;
|
|
||||||
found_default = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save the old VisualID */
|
|
||||||
orig_vid[j] = pVisual[i].vid;
|
|
||||||
|
|
||||||
/* Initialize the glXVisual */
|
|
||||||
glXVisualPtr[j] = pNewVisualConfigs[k];
|
|
||||||
glXVisualPtr[j].vid = pVisualNew[j].vid;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the class is -1, then assume the X visual information
|
|
||||||
* is identical to what GLX needs, and take them from the X
|
|
||||||
* visual. NOTE: if class != -1, then all other fields MUST
|
|
||||||
* be initialized.
|
|
||||||
*/
|
|
||||||
if (glXVisualPtr[j].class == -1) {
|
|
||||||
glXVisualPtr[j].class = pVisual[i].class;
|
|
||||||
glXVisualPtr[j].redSize = count_bits(pVisual[i].redMask);
|
|
||||||
glXVisualPtr[j].greenSize = count_bits(pVisual[i].greenMask);
|
|
||||||
glXVisualPtr[j].blueSize = count_bits(pVisual[i].blueMask);
|
|
||||||
glXVisualPtr[j].alphaSize = glXVisualPtr[j].alphaSize;
|
|
||||||
glXVisualPtr[j].redMask = pVisual[i].redMask;
|
|
||||||
glXVisualPtr[j].greenMask = pVisual[i].greenMask;
|
|
||||||
glXVisualPtr[j].blueMask = pVisual[i].blueMask;
|
|
||||||
glXVisualPtr[j].alphaMask = glXVisualPtr[j].alphaMask;
|
|
||||||
glXVisualPtr[j].bufferSize = rootDepth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save the device-dependent private for this visual */
|
|
||||||
glXVisualPriv[j] = pNewVisualPriv[k];
|
|
||||||
|
|
||||||
isGLXvis[j] = glxMatchGLXVisualInConfigList( &glXVisualPtr[j],
|
|
||||||
dmxScreens[screenInfo.numScreens-1].glxVisuals,
|
|
||||||
dmxScreens[screenInfo.numScreens-1].numGlxVisuals );
|
|
||||||
if (isGLXvis[j]) numGLXvis++;
|
|
||||||
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(j <= numNewVisuals);
|
|
||||||
numNewVisuals = j; /* correct number of new visuals */
|
|
||||||
|
|
||||||
/* Save the GLX visuals in the screen structure */
|
|
||||||
__glXActiveScreens[screenInfo.numScreens-1].numVisuals = numNewVisuals;
|
|
||||||
__glXActiveScreens[screenInfo.numScreens-1].numGLXVisuals = numGLXvis;
|
|
||||||
__glXActiveScreens[screenInfo.numScreens-1].isGLXvis = isGLXvis;
|
|
||||||
__glXActiveScreens[screenInfo.numScreens-1].pGlxVisual = glXVisualPtr;
|
|
||||||
|
|
||||||
|
|
||||||
/* Set up depth's VisualIDs */
|
|
||||||
for (i = 0; i < ndepth; i++) {
|
|
||||||
int numVids = 0;
|
|
||||||
VisualID *pVids = NULL;
|
|
||||||
int k, n = 0;
|
|
||||||
|
|
||||||
/* Count the new number of VisualIDs at this depth */
|
|
||||||
for (j = 0; j < pdepth[i].numVids; j++)
|
|
||||||
for (k = 0; k < numNewVisuals; k++)
|
|
||||||
if (pdepth[i].vids[j] == orig_vid[k])
|
|
||||||
numVids++;
|
|
||||||
|
|
||||||
/* Allocate a new list of VisualIDs for this depth */
|
|
||||||
pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID));
|
|
||||||
|
|
||||||
/* Initialize the new list of VisualIDs for this depth */
|
|
||||||
for (j = 0; j < pdepth[i].numVids; j++)
|
|
||||||
for (k = 0; k < numNewVisuals; k++)
|
|
||||||
if (pdepth[i].vids[j] == orig_vid[k])
|
|
||||||
pVids[n++] = pVisualNew[k].vid;
|
|
||||||
|
|
||||||
/* Update this depth's list of VisualIDs */
|
|
||||||
__glXFree(pdepth[i].vids);
|
|
||||||
pdepth[i].vids = pVids;
|
|
||||||
pdepth[i].numVids = numVids;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if the default visual was rejected - need to choose new
|
|
||||||
* default visual !
|
|
||||||
*/
|
|
||||||
if ( !found_default ) {
|
|
||||||
|
|
||||||
for (i=0; i<numVisuals; i++)
|
|
||||||
if (pVisual[i].vid == *defaultVisp)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (i < numVisuals) {
|
|
||||||
*defaultVisp = FindClosestVisual( &pVisual[i], rootDepth, pdepth, ndepth, pVisualNew, numNewVisuals );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update the X server's visuals */
|
|
||||||
*nvisualp = numNewVisuals;
|
|
||||||
*visualp = pVisualNew;
|
|
||||||
|
|
||||||
/* Free the old list of the X server's visuals */
|
|
||||||
__glXFree(pVisual);
|
|
||||||
|
|
||||||
/* Clean up temporary allocations */
|
|
||||||
__glXFree(orig_vid);
|
|
||||||
__glXFree(pNewVisualPriv);
|
|
||||||
__glXFree(pNewVisualConfigs);
|
|
||||||
|
|
||||||
/* Free the private list created by DDX HW driver */
|
|
||||||
free(visualPrivates);
|
|
||||||
visualPrivates = NULL;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -39,12 +39,4 @@ VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLX
|
||||||
|
|
||||||
VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen );
|
VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen );
|
||||||
|
|
||||||
void glxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
|
|
||||||
void **privates);
|
|
||||||
|
|
||||||
Bool glxInitVisuals(int *nvisualp, VisualPtr *visualp,
|
|
||||||
VisualID *defaultVisp,
|
|
||||||
int ndepth, DepthPtr pdepth,
|
|
||||||
int rootDepth);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -53,7 +53,6 @@ static GCOps VGAarbiterGCOps = {
|
||||||
VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16,
|
VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16,
|
||||||
VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt,
|
VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt,
|
||||||
VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels,
|
VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels,
|
||||||
{NULL} /* devPrivate */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = {
|
static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = {
|
||||||
|
@ -574,9 +573,7 @@ VGAarbiterCreateGC(GCPtr pGC)
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
SCREEN_PROLOG(CreateGC);
|
SCREEN_PROLOG(CreateGC);
|
||||||
VGAGet(pScreen);
|
|
||||||
ret = (*pScreen->CreateGC)(pGC);
|
ret = (*pScreen->CreateGC)(pGC);
|
||||||
VGAPut();
|
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC);
|
SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC);
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,6 @@ cat > sdksyms.c << EOF
|
||||||
#include "xaa.h"
|
#include "xaa.h"
|
||||||
#include "xaalocal.h"
|
#include "xaalocal.h"
|
||||||
#include "xaarop.h"
|
#include "xaarop.h"
|
||||||
#include "xaaWrapper.h"
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1730,6 +1730,5 @@ GCOps ShadowGCOps = {
|
||||||
ShadowPolyText16, ShadowImageText8,
|
ShadowPolyText16, ShadowImageText8,
|
||||||
ShadowImageText16, ShadowImageGlyphBlt,
|
ShadowImageText16, ShadowImageGlyphBlt,
|
||||||
ShadowPolyGlyphBlt, ShadowPushPixels,
|
ShadowPolyGlyphBlt, ShadowPushPixels,
|
||||||
{NULL} /* devPrivate */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ module_LTLIBRARIES = libxaa.la
|
||||||
libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
|
libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
|
||||||
xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
|
xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
|
||||||
xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
|
xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
|
||||||
xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
|
xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c \
|
||||||
xaaRect.c xaaLineMisc.c xaaBitOrder.c \
|
xaaRect.c xaaLineMisc.c xaaBitOrder.c \
|
||||||
xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
|
xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
|
||||||
xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
|
xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
|
||||||
|
@ -64,7 +64,7 @@ DISTCLEANFILES = $(POLYSEG) \
|
||||||
$(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
|
$(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
|
||||||
$(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
|
$(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
|
||||||
|
|
||||||
sdk_HEADERS = xaa.h xaalocal.h xaarop.h xaaWrapper.h
|
sdk_HEADERS = xaa.h xaalocal.h xaarop.h
|
||||||
EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
|
EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
|
||||||
xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \
|
xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \
|
||||||
XAA.HOWTO
|
XAA.HOWTO
|
||||||
|
|
|
@ -343,7 +343,6 @@ GCOps XAAFallbackOps = {
|
||||||
XAAPolyText16Fallback, XAAImageText8Fallback,
|
XAAPolyText16Fallback, XAAImageText8Fallback,
|
||||||
XAAImageText16Fallback, XAAImageGlyphBltFallback,
|
XAAImageText16Fallback, XAAImageGlyphBltFallback,
|
||||||
XAAPolyGlyphBltFallback, XAAPushPixelsFallback,
|
XAAPolyGlyphBltFallback, XAAPushPixelsFallback,
|
||||||
{NULL} /* devPrivate */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GCOps *XAAGetFallbackOps(void)
|
GCOps *XAAGetFallbackOps(void)
|
||||||
|
|
|
@ -48,11 +48,6 @@ XAACreateGC(GCPtr pGC)
|
||||||
pGCPriv->wrapOps = NULL;
|
pGCPriv->wrapOps = NULL;
|
||||||
pGCPriv->wrapFuncs = pGC->funcs;
|
pGCPriv->wrapFuncs = pGC->funcs;
|
||||||
pGCPriv->XAAOps = &XAAFallbackOps;
|
pGCPriv->XAAOps = &XAAFallbackOps;
|
||||||
pGCPriv->flags = 0;
|
|
||||||
pGCPriv->DashLength = 0;
|
|
||||||
pGCPriv->DashPattern = NULL;
|
|
||||||
pGCPriv->changes = 0;
|
|
||||||
/* initialize any other private fields here */
|
|
||||||
pGC->funcs = &XAAGCFuncs;
|
pGC->funcs = &XAAGCFuncs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,5 +646,4 @@ GCOps XAAPixmapOps = {
|
||||||
XAAPolyText16Pixmap, XAAImageText8Pixmap,
|
XAAPolyText16Pixmap, XAAImageText8Pixmap,
|
||||||
XAAImageText16Pixmap, XAAImageGlyphBltPixmap,
|
XAAImageText16Pixmap, XAAImageGlyphBltPixmap,
|
||||||
XAAPolyGlyphBltPixmap, XAAPushPixelsPixmap,
|
XAAPolyGlyphBltPixmap, XAAPushPixelsPixmap,
|
||||||
{NULL} /* devPrivate */
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,477 +0,0 @@
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
#include "gcstruct.h"
|
|
||||||
#include "glyphstr.h"
|
|
||||||
#include "window.h"
|
|
||||||
#include "windowstr.h"
|
|
||||||
#include "picture.h"
|
|
||||||
#include "picturestr.h"
|
|
||||||
#include "colormapst.h"
|
|
||||||
#include "xaa.h"
|
|
||||||
#include "xaalocal.h"
|
|
||||||
#include "xaaWrapper.h"
|
|
||||||
|
|
||||||
void XAASync(ScreenPtr pScreen);
|
|
||||||
|
|
||||||
/* #include "render.h" */
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
#define COND(pDraw) \
|
|
||||||
((pDraw)->depth \
|
|
||||||
!= (xaaWrapperGetScrPriv(((DrawablePtr)(pDraw))->pScreen))->depth)
|
|
||||||
#else
|
|
||||||
#define COND(pDraw) 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static Bool xaaWrapperCreateGC(GCPtr pGC);
|
|
||||||
static void xaaWrapperValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw);
|
|
||||||
static void xaaWrapperDestroyGC(GCPtr pGC);
|
|
||||||
static void xaaWrapperChangeGC (GCPtr pGC, unsigned long mask);
|
|
||||||
static void xaaWrapperCopyGC (GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
|
|
||||||
static void xaaWrapperChangeClip (GCPtr pGC, int type, pointer pvalue, int nrects);
|
|
||||||
|
|
||||||
static void xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
|
|
||||||
static void xaaWrapperDestroyClip(GCPtr pGC);
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
|
||||||
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
|
|
||||||
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
|
|
||||||
static void
|
|
||||||
xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
|
|
||||||
GlyphListPtr list, GlyphPtr *glyphs);
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
|
||||||
CreateWindowProcPtr CreateWindow;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
|
||||||
WindowExposuresProcPtr WindowExposures;
|
|
||||||
CreateGCProcPtr CreateGC;
|
|
||||||
CreateColormapProcPtr CreateColormap;
|
|
||||||
DestroyColormapProcPtr DestroyColormap;
|
|
||||||
InstallColormapProcPtr InstallColormap;
|
|
||||||
UninstallColormapProcPtr UninstallColormap;
|
|
||||||
ListInstalledColormapsProcPtr ListInstalledColormaps;
|
|
||||||
StoreColorsProcPtr StoreColors;
|
|
||||||
CompositeProcPtr Composite;
|
|
||||||
GlyphsProcPtr Glyphs;
|
|
||||||
|
|
||||||
CloseScreenProcPtr wrapCloseScreen;
|
|
||||||
CreateScreenResourcesProcPtr wrapCreateScreenResources;
|
|
||||||
CreateWindowProcPtr wrapCreateWindow;
|
|
||||||
CopyWindowProcPtr wrapCopyWindow;
|
|
||||||
WindowExposuresProcPtr wrapWindowExposures;
|
|
||||||
CreateGCProcPtr wrapCreateGC;
|
|
||||||
CreateColormapProcPtr wrapCreateColormap;
|
|
||||||
DestroyColormapProcPtr wrapDestroyColormap;
|
|
||||||
InstallColormapProcPtr wrapInstallColormap;
|
|
||||||
UninstallColormapProcPtr wrapUninstallColormap;
|
|
||||||
ListInstalledColormapsProcPtr wrapListInstalledColormaps;
|
|
||||||
StoreColorsProcPtr wrapStoreColors;
|
|
||||||
CompositeProcPtr wrapComposite;
|
|
||||||
GlyphsProcPtr wrapGlyphs;
|
|
||||||
int depth;
|
|
||||||
} xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr;
|
|
||||||
|
|
||||||
#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr) \
|
|
||||||
dixLookupPrivate(&(s)->devPrivates, xaaWrapperScrPrivateKey))
|
|
||||||
#define xaaWrapperScrPriv(s) xaaWrapperScrPrivPtr pScrPriv = xaaWrapperGetScrPriv(s)
|
|
||||||
|
|
||||||
#define wrap(priv,real,mem,func) {\
|
|
||||||
priv->mem = real->mem; \
|
|
||||||
real->mem = func; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define unwrap(priv,real,mem) {\
|
|
||||||
real->mem = 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; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#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;
|
|
||||||
Bool wrap;
|
|
||||||
GCFuncs *funcs;
|
|
||||||
GCOps *wrapops;
|
|
||||||
} xaaWrapperGCPrivRec, *xaaWrapperGCPrivPtr;
|
|
||||||
|
|
||||||
#define xaaWrapperGetGCPriv(pGC) ((xaaWrapperGCPrivPtr) \
|
|
||||||
dixLookupPrivate(&(pGC)->devPrivates, xaaWrapperGCPrivateKey))
|
|
||||||
#define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC)
|
|
||||||
|
|
||||||
|
|
||||||
static DevPrivateKeyRec xaaWrapperScrPrivateKeyRec;
|
|
||||||
#define xaaWrapperScrPrivateKey (&xaaWrapperScrPrivateKeyRec)
|
|
||||||
static DevPrivateKeyRec xaaWrapperGCPrivateKeyRec;
|
|
||||||
#define xaaWrapperGCPrivateKey (&xaaWrapperGCPrivateKeyRec)
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xaaWrapperCreateScreenResources(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
unwrap (pScrPriv,pScreen, CreateScreenResources);
|
|
||||||
ret = pScreen->CreateScreenResources(pScreen);
|
|
||||||
wrap(pScrPriv,pScreen,CreateScreenResources,xaaWrapperCreateScreenResources);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xaaWrapperCloseScreen (int iScreen, ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
unwrap (pScrPriv,pScreen, CloseScreen);
|
|
||||||
ret = pScreen->CloseScreen(iScreen,pScreen);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xaaWrapperCreateWindow(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pWin->drawable.pScreen);
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
CreateWindow, wrapCreateWindow);
|
|
||||||
ret = pWin->drawable.pScreen->CreateWindow(pWin);
|
|
||||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, CreateWindow,
|
|
||||||
wrapCreateWindow, xaaWrapperCreateWindow);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperCopyWindow(WindowPtr pWin,
|
|
||||||
DDXPointRec ptOldOrg,
|
|
||||||
RegionPtr prgnSrc)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
|
|
||||||
unwrap (pScrPriv, pScreen, CopyWindow);
|
|
||||||
#if 0
|
|
||||||
if (COND(&pWin->drawable))
|
|
||||||
pWin->drawable.pScreen->CopyWindow = pScrPriv->wrapCopyWindow;
|
|
||||||
#endif
|
|
||||||
pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc);
|
|
||||||
wrap(pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperWindowExposures (WindowPtr pWin,
|
|
||||||
RegionPtr prgn,
|
|
||||||
RegionPtr other_exposed)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pWin->drawable.pScreen);
|
|
||||||
|
|
||||||
cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
WindowExposures, wrapWindowExposures);
|
|
||||||
pWin->drawable.pScreen->WindowExposures(pWin, prgn, other_exposed);
|
|
||||||
cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
|
|
||||||
WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xaaWrapperCreateColormap(ColormapPtr pmap)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pmap->pScreen);
|
|
||||||
Bool ret;
|
|
||||||
unwrap(pScrPriv,pmap->pScreen, CreateColormap);
|
|
||||||
ret = pmap->pScreen->CreateColormap(pmap);
|
|
||||||
wrap(pScrPriv,pmap->pScreen,CreateColormap,xaaWrapperCreateColormap);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperDestroyColormap(ColormapPtr pmap)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pmap->pScreen);
|
|
||||||
unwrap(pScrPriv,pmap->pScreen, DestroyColormap);
|
|
||||||
pmap->pScreen->DestroyColormap(pmap);
|
|
||||||
wrap(pScrPriv,pmap->pScreen,DestroyColormap,xaaWrapperDestroyColormap);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperStoreColors(ColormapPtr pmap, int nColors, xColorItem *pColors)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pmap->pScreen);
|
|
||||||
unwrap(pScrPriv,pmap->pScreen, StoreColors);
|
|
||||||
pmap->pScreen->StoreColors(pmap,nColors,pColors);
|
|
||||||
wrap(pScrPriv,pmap->pScreen,StoreColors,xaaWrapperStoreColors);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperInstallColormap(ColormapPtr pmap)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pmap->pScreen);
|
|
||||||
|
|
||||||
unwrap(pScrPriv,pmap->pScreen, InstallColormap);
|
|
||||||
pmap->pScreen->InstallColormap(pmap);
|
|
||||||
wrap(pScrPriv,pmap->pScreen,InstallColormap,xaaWrapperInstallColormap);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperUninstallColormap(ColormapPtr pmap)
|
|
||||||
{
|
|
||||||
xaaWrapperScrPriv(pmap->pScreen);
|
|
||||||
|
|
||||||
unwrap(pScrPriv,pmap->pScreen, UninstallColormap);
|
|
||||||
pmap->pScreen->UninstallColormap(pmap);
|
|
||||||
wrap(pScrPriv,pmap->pScreen,UninstallColormap,xaaWrapperUninstallColormap);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
xaaWrapperListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIds)
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
|
|
||||||
unwrap(pScrPriv,pScreen, ListInstalledColormaps);
|
|
||||||
n = pScreen->ListInstalledColormaps(pScreen, pCmapIds);
|
|
||||||
wrap (pScrPriv,pScreen,ListInstalledColormaps,xaaWrapperListInstalledColormaps);
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *func)
|
|
||||||
{
|
|
||||||
Bool ret;
|
|
||||||
xaaWrapperScrPrivPtr pScrPriv;
|
|
||||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey(&xaaWrapperGCPrivateKeyRec, PRIVATE_GC, sizeof(xaaWrapperGCPrivRec)))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey(&xaaWrapperScrPrivateKeyRec, PRIVATE_SCREEN, 0))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
pScrPriv = (xaaWrapperScrPrivPtr) malloc(sizeof (xaaWrapperScrPrivRec));
|
|
||||||
if (!pScrPriv)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
get (pScrPriv, pScreen, CloseScreen, wrapCloseScreen);
|
|
||||||
get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources);
|
|
||||||
get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow);
|
|
||||||
get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow);
|
|
||||||
get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
|
|
||||||
get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
|
|
||||||
get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
|
|
||||||
get (pScrPriv, pScreen, DestroyColormap, wrapDestroyColormap);
|
|
||||||
get (pScrPriv, pScreen, InstallColormap, wrapInstallColormap);
|
|
||||||
get (pScrPriv, pScreen, UninstallColormap, wrapUninstallColormap);
|
|
||||||
get (pScrPriv, pScreen, ListInstalledColormaps, wrapListInstalledColormaps);
|
|
||||||
get (pScrPriv, pScreen, StoreColors, wrapStoreColors);
|
|
||||||
if (ps) {
|
|
||||||
get (pScrPriv, ps, Glyphs, wrapGlyphs);
|
|
||||||
get (pScrPriv, ps, Composite, wrapComposite);
|
|
||||||
}
|
|
||||||
if (!(ret = XAAInit(pScreen,infoPtr)))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
wrap (pScrPriv, pScreen, CloseScreen, xaaWrapperCloseScreen);
|
|
||||||
wrap (pScrPriv, pScreen, CreateScreenResources,
|
|
||||||
xaaWrapperCreateScreenResources);
|
|
||||||
wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow);
|
|
||||||
wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
|
|
||||||
wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures);
|
|
||||||
wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
|
|
||||||
wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap);
|
|
||||||
wrap (pScrPriv, pScreen, DestroyColormap, xaaWrapperDestroyColormap);
|
|
||||||
wrap (pScrPriv, pScreen, InstallColormap, xaaWrapperInstallColormap);
|
|
||||||
wrap (pScrPriv, pScreen, UninstallColormap, xaaWrapperUninstallColormap);
|
|
||||||
wrap (pScrPriv, pScreen, ListInstalledColormaps,
|
|
||||||
xaaWrapperListInstalledColormaps);
|
|
||||||
wrap (pScrPriv, pScreen, StoreColors, xaaWrapperStoreColors);
|
|
||||||
|
|
||||||
if (ps) {
|
|
||||||
wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
|
|
||||||
wrap (pScrPriv, ps, Composite, xaaWrapperComposite);
|
|
||||||
}
|
|
||||||
pScrPriv->depth = depth;
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv);
|
|
||||||
|
|
||||||
*func = XAASync;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
GCFuncs xaaWrapperGCFuncs = {
|
|
||||||
xaaWrapperValidateGC, xaaWrapperChangeGC, xaaWrapperCopyGC,
|
|
||||||
xaaWrapperDestroyGC, xaaWrapperChangeClip, xaaWrapperDestroyClip,
|
|
||||||
xaaWrapperCopyClip
|
|
||||||
};
|
|
||||||
|
|
||||||
#define XAAWRAPPER_GC_FUNC_PROLOGUE(pGC) \
|
|
||||||
xaaWrapperGCPriv(pGC); \
|
|
||||||
unwrap(pGCPriv, pGC, funcs); \
|
|
||||||
if (pGCPriv->wrap) unwrap(pGCPriv, pGC, ops)
|
|
||||||
|
|
||||||
#define XAAWRAPPER_GC_FUNC_EPILOGUE(pGC) \
|
|
||||||
wrap(pGCPriv, pGC, funcs, &xaaWrapperGCFuncs); \
|
|
||||||
if (pGCPriv->wrap) wrap(pGCPriv, pGC, ops, pGCPriv->wrapops)
|
|
||||||
|
|
||||||
static Bool
|
|
||||||
xaaWrapperCreateGC(GCPtr pGC)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pGC->pScreen;
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
xaaWrapperGCPriv(pGC);
|
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
unwrap (pScrPriv, pScreen, CreateGC);
|
|
||||||
if((ret = (*pScreen->CreateGC) (pGC))) {
|
|
||||||
pGCPriv->wrap = FALSE;
|
|
||||||
pGCPriv->funcs = pGC->funcs;
|
|
||||||
pGCPriv->wrapops = pGC->ops;
|
|
||||||
pGC->funcs = &xaaWrapperGCFuncs;
|
|
||||||
}
|
|
||||||
wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperValidateGC(
|
|
||||||
GCPtr pGC,
|
|
||||||
unsigned long changes,
|
|
||||||
DrawablePtr pDraw
|
|
||||||
){
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
|
|
||||||
(*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
|
|
||||||
|
|
||||||
if(COND(pDraw))
|
|
||||||
pGCPriv->wrap = TRUE;
|
|
||||||
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperDestroyGC(GCPtr pGC)
|
|
||||||
{
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
|
|
||||||
(*pGC->funcs->DestroyGC)(pGC);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperChangeGC (
|
|
||||||
GCPtr pGC,
|
|
||||||
unsigned long mask
|
|
||||||
){
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
|
|
||||||
(*pGC->funcs->ChangeGC) (pGC, mask);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperCopyGC (
|
|
||||||
GCPtr pGCSrc,
|
|
||||||
unsigned long mask,
|
|
||||||
GCPtr pGCDst
|
|
||||||
){
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGCDst);
|
|
||||||
(*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGCDst);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperChangeClip (
|
|
||||||
GCPtr pGC,
|
|
||||||
int type,
|
|
||||||
pointer pvalue,
|
|
||||||
int nrects
|
|
||||||
){
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
|
|
||||||
(*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
|
|
||||||
{
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pgcDst);
|
|
||||||
(* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pgcDst);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperDestroyClip(GCPtr pGC)
|
|
||||||
{
|
|
||||||
XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
|
|
||||||
(* pGC->funcs->DestroyClip)(pGC);
|
|
||||||
XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
|
||||||
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
|
|
||||||
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
|
|
||||||
unwrap (pScrPriv, ps, Composite);
|
|
||||||
(*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
|
||||||
xDst, yDst, width, height);
|
|
||||||
wrap (pScrPriv, ps, Composite, xaaWrapperComposite);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|
||||||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
|
|
||||||
GlyphListPtr list, GlyphPtr *glyphs)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
|
||||||
xaaWrapperScrPriv(pScreen);
|
|
||||||
|
|
||||||
unwrap (pScrPriv, ps, Glyphs);
|
|
||||||
(*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc,
|
|
||||||
nlist, list, glyphs);
|
|
||||||
wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
XAASync(ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
XAAScreenPtr pScreenPriv = (XAAScreenPtr)
|
|
||||||
dixLookupPrivate(&pScreen->devPrivates, XAAGetScreenKey());
|
|
||||||
XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
|
|
||||||
|
|
||||||
if(infoRec->NeedToSync) {
|
|
||||||
(*infoRec->Sync)(infoRec->pScrn);
|
|
||||||
infoRec->NeedToSync = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
#ifndef _XAA_WRAPPER_H
|
|
||||||
# define _XAA_WRAPPER_H
|
|
||||||
|
|
||||||
typedef void (*SyncFunc)(ScreenPtr);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool xaaSetupWrapper(ScreenPtr pScreen,
|
|
||||||
XAAInfoRecPtr infoPtr, int depth, SyncFunc *func);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -34,6 +34,8 @@ is" without express or implied warranty.
|
||||||
#include "XNWindow.h"
|
#include "XNWindow.h"
|
||||||
#include "Args.h"
|
#include "Args.h"
|
||||||
|
|
||||||
|
DevPrivateKeyRec xnestColormapPrivateKeyRec;
|
||||||
|
|
||||||
static DevPrivateKeyRec cmapScrPrivateKeyRec;
|
static DevPrivateKeyRec cmapScrPrivateKeyRec;
|
||||||
#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)
|
#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)
|
||||||
|
|
||||||
|
@ -52,8 +54,6 @@ xnestCreateColormap(ColormapPtr pCmap)
|
||||||
pVisual = pCmap->pVisual;
|
pVisual = pCmap->pVisual;
|
||||||
ncolors = pVisual->ColormapEntries;
|
ncolors = pVisual->ColormapEntries;
|
||||||
|
|
||||||
pCmap->devPriv = (pointer)malloc(sizeof(xnestPrivColormap));
|
|
||||||
|
|
||||||
xnestColormapPriv(pCmap)->colormap =
|
xnestColormapPriv(pCmap)->colormap =
|
||||||
XCreateColormap(xnestDisplay,
|
XCreateColormap(xnestDisplay,
|
||||||
xnestDefaultWindows[pCmap->pScreen->myNum],
|
xnestDefaultWindows[pCmap->pScreen->myNum],
|
||||||
|
@ -130,7 +130,6 @@ void
|
||||||
xnestDestroyColormap(ColormapPtr pCmap)
|
xnestDestroyColormap(ColormapPtr pCmap)
|
||||||
{
|
{
|
||||||
XFreeColormap(xnestDisplay, xnestColormap(pCmap));
|
XFreeColormap(xnestDisplay, xnestColormap(pCmap));
|
||||||
free(pCmap->devPriv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SEARCH_PREDICATE \
|
#define SEARCH_PREDICATE \
|
||||||
|
|
|
@ -32,8 +32,9 @@ typedef struct {
|
||||||
int index;
|
int index;
|
||||||
} xnestInstalledColormapWindows;
|
} xnestInstalledColormapWindows;
|
||||||
|
|
||||||
|
extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
|
||||||
#define xnestColormapPriv(pCmap) \
|
#define xnestColormapPriv(pCmap) \
|
||||||
((xnestPrivColormap *)((pCmap)->devPriv))
|
((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
|
||||||
|
|
||||||
#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
|
#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
|
||||||
|
|
||||||
|
|
|
@ -73,9 +73,6 @@ static GCOps xnestOps = {
|
||||||
Bool
|
Bool
|
||||||
xnestCreateGC(GCPtr pGC)
|
xnestCreateGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
pGC->clientClipType = CT_NONE;
|
|
||||||
pGC->clientClip = NULL;
|
|
||||||
|
|
||||||
pGC->funcs = &xnestFuncs;
|
pGC->funcs = &xnestFuncs;
|
||||||
pGC->ops = &xnestOps;
|
pGC->ops = &xnestOps;
|
||||||
|
|
||||||
|
@ -92,8 +89,6 @@ xnestCreateGC(GCPtr pGC)
|
||||||
void
|
void
|
||||||
xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
||||||
{
|
{
|
||||||
pGC->lastWinOrg.x = pDrawable->x;
|
|
||||||
pGC->lastWinOrg.y = pDrawable->y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -151,6 +151,8 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!dixRegisterPrivateKey(&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof (xnestPrivPixmap)))
|
if (!dixRegisterPrivateKey(&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof (xnestPrivPixmap)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (!dixRegisterPrivateKey(&xnestColormapPrivateKeyRec, PRIVATE_COLORMAP, sizeof (xnestPrivColormap)))
|
||||||
|
return FALSE;
|
||||||
if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0))
|
if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GCOps *originalOps;
|
GCOps *originalOps;
|
||||||
GCOps *driOps;
|
|
||||||
} DRIGCRec;
|
} DRIGCRec;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -86,9 +85,7 @@ DRIUnwrapGC(GCPtr pGC) {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DRIWrapGC(GCPtr pGC) {
|
DRIWrapGC(GCPtr pGC) {
|
||||||
DRIGCRec *pGCPriv = DRIGetGCPriv(pGC);
|
pGC->ops = &driGCOps;
|
||||||
|
|
||||||
pGC->ops = pGCPriv->driOps;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -513,7 +510,6 @@ DRICreateGC(GCPtr pGC) {
|
||||||
if(ret) {
|
if(ret) {
|
||||||
pGCPriv->originalOps = pGC->ops;
|
pGCPriv->originalOps = pGC->ops;
|
||||||
pGC->ops = &driGCOps;
|
pGC->ops = &driGCOps;
|
||||||
pGCPriv->driOps = &driGCOps;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wrap(pScreenPriv, pScreen, CreateGC, DRICreateGC);
|
wrap(pScreenPriv, pScreen, CreateGC, DRICreateGC);
|
||||||
|
|
|
@ -463,8 +463,6 @@ static RootlessFrameProcsRec xprRootlessProcs = {
|
||||||
xprHideWindow,
|
xprHideWindow,
|
||||||
xprUpdateColormap,
|
xprUpdateColormap,
|
||||||
xp_copy_bytes,
|
xp_copy_bytes,
|
||||||
xp_fill_bytes,
|
|
||||||
xp_composite_pixels,
|
|
||||||
xprCopyWindow
|
xprCopyWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -480,8 +478,6 @@ xprInit(ScreenPtr pScreen)
|
||||||
TA_SERVER();
|
TA_SERVER();
|
||||||
|
|
||||||
rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
|
rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
|
||||||
rootless_FillBytes_threshold = xp_fill_bytes_threshold;
|
|
||||||
rootless_CompositePixels_threshold = xp_composite_area_threshold;
|
|
||||||
rootless_CopyWindow_threshold = xp_scroll_area_threshold;
|
rootless_CopyWindow_threshold = xp_scroll_area_threshold;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -367,12 +367,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
|
||||||
static Bool
|
static Bool
|
||||||
xprSetupScreen(int index, ScreenPtr pScreen)
|
xprSetupScreen(int index, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
// Initialize accelerated rootless drawing
|
|
||||||
// Note that this must be done before DamageSetup().
|
|
||||||
|
|
||||||
// These are crashing ugly... better to be stable and not crash for now.
|
|
||||||
//RootlessAccelInit(pScreen);
|
|
||||||
|
|
||||||
#ifdef DAMAGE
|
#ifdef DAMAGE
|
||||||
// The Damage extension needs to wrap underneath the
|
// The Damage extension needs to wrap underneath the
|
||||||
// generic rootless layer, so do it now.
|
// generic rootless layer, so do it now.
|
||||||
|
|
|
@ -1376,16 +1376,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int height,
|
||||||
const void *src, unsigned int srcRowBytes,
|
const void *src, unsigned int srcRowBytes,
|
||||||
void *dst, unsigned int dstRowBytes);
|
void *dst, unsigned int dstRowBytes);
|
||||||
|
|
||||||
void
|
|
||||||
winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int value,
|
|
||||||
void *dst, unsigned int dstRowBytes);
|
|
||||||
|
|
||||||
int
|
|
||||||
winMWExtWMCompositePixels (unsigned int width, unsigned int height, unsigned int function,
|
|
||||||
void *src[2], unsigned int srcRowBytes[2],
|
|
||||||
void *mask, unsigned int maskRowBytes,
|
|
||||||
void *dst[2], unsigned int dstRowBytes[2]);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
|
winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
|
||||||
int dx, int dy);
|
int dx, int dy);
|
||||||
|
|
|
@ -137,11 +137,6 @@ winCreateGCNativeGDI (GCPtr pGC)
|
||||||
pGC->depth);
|
pGC->depth);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pGC->clientClip = NULL;
|
|
||||||
pGC->clientClipType = CT_NONE;
|
|
||||||
pGC->freeCompClip = FALSE;
|
|
||||||
pGC->pCompositeClip = 0;
|
|
||||||
|
|
||||||
pGC->ops = (GCOps *) &winGCOps;
|
pGC->ops = (GCOps *) &winGCOps;
|
||||||
pGC->funcs = (GCFuncs *) &winGCFuncs;
|
pGC->funcs = (GCFuncs *) &winGCFuncs;
|
||||||
|
|
||||||
|
|
|
@ -54,17 +54,13 @@ winMWExtWMProcs = {
|
||||||
winMWExtWMStartDrawing,
|
winMWExtWMStartDrawing,
|
||||||
winMWExtWMStopDrawing,
|
winMWExtWMStopDrawing,
|
||||||
winMWExtWMUpdateRegion,
|
winMWExtWMUpdateRegion,
|
||||||
#ifndef ROOTLESS_TRACK_DAMAGE
|
|
||||||
winMWExtWMDamageRects,
|
winMWExtWMDamageRects,
|
||||||
#endif
|
|
||||||
winMWExtWMRootlessSwitchWindow,
|
winMWExtWMRootlessSwitchWindow,
|
||||||
NULL,//winMWExtWMDoReorderWindow,
|
NULL,//winMWExtWMDoReorderWindow,
|
||||||
NULL,//winMWExtWMHideWindow,
|
NULL,//winMWExtWMHideWindow,
|
||||||
NULL,//winMWExtWMUpdateColorMap,
|
NULL,//winMWExtWMUpdateColorMap,
|
||||||
|
|
||||||
NULL,//winMWExtWMCopyBytes,
|
NULL,//winMWExtWMCopyBytes,
|
||||||
NULL,//winMWExtWMFillBytes,
|
|
||||||
NULL,//winMWExtWMCompositePixels,
|
|
||||||
winMWExtWMCopyWindow
|
winMWExtWMCopyWindow
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -465,8 +461,6 @@ winFinishScreenInitFB (int index,
|
||||||
winDebug ("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
|
winDebug ("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
|
||||||
|
|
||||||
rootless_CopyBytes_threshold = 0;
|
rootless_CopyBytes_threshold = 0;
|
||||||
rootless_FillBytes_threshold = 0;
|
|
||||||
rootless_CompositePixels_threshold = 0;
|
|
||||||
/* FIXME: How many? Profiling needed? */
|
/* FIXME: How many? Profiling needed? */
|
||||||
rootless_CopyWindow_threshold = 1;
|
rootless_CopyWindow_threshold = 1;
|
||||||
|
|
||||||
|
|
|
@ -1006,28 +1006,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int height,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int value,
|
|
||||||
void *dst, unsigned int dstRowBytes)
|
|
||||||
{
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
|
||||||
winDebug ("winMWExtWMFillBytes - Not implemented\n");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
winMWExtWMCompositePixels (unsigned int width, unsigned int height, unsigned int function,
|
|
||||||
void *src[2], unsigned int srcRowBytes[2],
|
|
||||||
void *mask, unsigned int maskRowBytes,
|
|
||||||
void *dst[2], unsigned int dstRowBytes[2])
|
|
||||||
{
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
|
||||||
winDebug ("winMWExtWMCompositePixels - Not implemented\n");
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
winMWExtWMCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pDstRects,
|
winMWExtWMCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pDstRects,
|
||||||
int nDx, int nDy)
|
int nDx, int nDy)
|
||||||
|
|
|
@ -97,16 +97,6 @@ typedef struct _LFclosure {
|
||||||
|
|
||||||
/* PolyText */
|
/* PolyText */
|
||||||
|
|
||||||
typedef
|
|
||||||
int (* PolyTextPtr)(
|
|
||||||
DrawablePtr /* pDraw */,
|
|
||||||
GCPtr /* pGC */,
|
|
||||||
int /* x */,
|
|
||||||
int /* y */,
|
|
||||||
int /* count */,
|
|
||||||
void * /* chars or shorts */
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct _PTclosure {
|
typedef struct _PTclosure {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -117,24 +107,12 @@ typedef struct _PTclosure {
|
||||||
int xorg;
|
int xorg;
|
||||||
int yorg;
|
int yorg;
|
||||||
CARD8 reqType;
|
CARD8 reqType;
|
||||||
PolyTextPtr polyText;
|
|
||||||
int itemSize;
|
|
||||||
XID did;
|
XID did;
|
||||||
int err;
|
int err;
|
||||||
} PTclosureRec;
|
} PTclosureRec;
|
||||||
|
|
||||||
/* ImageText */
|
/* ImageText */
|
||||||
|
|
||||||
typedef
|
|
||||||
void (* ImageTextPtr)(
|
|
||||||
DrawablePtr /* pDraw */,
|
|
||||||
GCPtr /* pGC */,
|
|
||||||
int /* x */,
|
|
||||||
int /* y */,
|
|
||||||
int /* count */,
|
|
||||||
void * /* chars or shorts */
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct _ITclosure {
|
typedef struct _ITclosure {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -144,8 +122,6 @@ typedef struct _ITclosure {
|
||||||
int xorg;
|
int xorg;
|
||||||
int yorg;
|
int yorg;
|
||||||
CARD8 reqType;
|
CARD8 reqType;
|
||||||
ImageTextPtr imageText;
|
|
||||||
int itemSize;
|
|
||||||
XID did;
|
XID did;
|
||||||
} ITclosureRec;
|
} ITclosureRec;
|
||||||
#endif /* CLOSESTR_H */
|
#endif /* CLOSESTR_H */
|
||||||
|
|
|
@ -126,9 +126,7 @@ typedef struct _ColormapRec
|
||||||
Entry *red;
|
Entry *red;
|
||||||
Entry *green;
|
Entry *green;
|
||||||
Entry *blue;
|
Entry *blue;
|
||||||
pointer devPriv;
|
PrivateRec *devPrivates;
|
||||||
PrivateRec *devPrivates; /* dynamic devPrivates added after devPriv
|
|
||||||
already existed - must keep devPriv */
|
|
||||||
} ColormapRec;
|
} ColormapRec;
|
||||||
|
|
||||||
#endif /* COLORMAP_H */
|
#endif /* COLORMAP_H */
|
||||||
|
|
|
@ -122,10 +122,6 @@ extern _X_EXPORT int FreeGC(
|
||||||
pointer /*pGC*/,
|
pointer /*pGC*/,
|
||||||
XID /*gid*/);
|
XID /*gid*/);
|
||||||
|
|
||||||
extern _X_EXPORT GCPtr CreateScratchGC(
|
|
||||||
ScreenPtr /*pScreen*/,
|
|
||||||
unsigned /*depth*/);
|
|
||||||
|
|
||||||
extern _X_EXPORT void FreeGCperDepth(
|
extern _X_EXPORT void FreeGCperDepth(
|
||||||
int /*screenNum*/);
|
int /*screenNum*/);
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,6 @@ typedef struct _GCFuncs {
|
||||||
void (* CopyClip)(
|
void (* CopyClip)(
|
||||||
GCPtr /*pgcDst*/,
|
GCPtr /*pgcDst*/,
|
||||||
GCPtr /*pgcSrc*/);
|
GCPtr /*pgcSrc*/);
|
||||||
DevUnion devPrivate;
|
|
||||||
} GCFuncs;
|
} GCFuncs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -264,8 +263,6 @@ typedef struct _GCOps {
|
||||||
int /*h*/,
|
int /*h*/,
|
||||||
int /*x*/,
|
int /*x*/,
|
||||||
int /*y*/);
|
int /*y*/);
|
||||||
|
|
||||||
DevUnion devPrivate;
|
|
||||||
} GCOps;
|
} GCOps;
|
||||||
|
|
||||||
/* there is padding in the bit fields because the Sun compiler doesn't
|
/* there is padding in the bit fields because the Sun compiler doesn't
|
||||||
|
@ -306,7 +303,6 @@ typedef struct _GC {
|
||||||
DDXPointRec patOrg; /* origin for (tile, stipple) */
|
DDXPointRec patOrg; /* origin for (tile, stipple) */
|
||||||
struct _Font *font;
|
struct _Font *font;
|
||||||
DDXPointRec clipOrg;
|
DDXPointRec clipOrg;
|
||||||
DDXPointRec lastWinOrg; /* position of window last validated */
|
|
||||||
pointer clientClip;
|
pointer clientClip;
|
||||||
unsigned long stateChanges; /* masked with GC_<kind> */
|
unsigned long stateChanges; /* masked with GC_<kind> */
|
||||||
unsigned long serialNumber;
|
unsigned long serialNumber;
|
||||||
|
|
|
@ -182,8 +182,6 @@ miPolyGlyphBlt(
|
||||||
0, 0, gWidth, gHeight,
|
0, 0, gWidth, gHeight,
|
||||||
0, XYBitmap, (char *)pb);
|
0, XYBitmap, (char *)pb);
|
||||||
|
|
||||||
if ((pGC->serialNumber) != (pDrawable->serialNumber))
|
|
||||||
ValidateGC(pDrawable, pGC);
|
|
||||||
(*pGC->ops->PushPixels)(pGC, pPixmap, pDrawable,
|
(*pGC->ops->PushPixels)(pGC, pPixmap, pDrawable,
|
||||||
gWidth, gHeight,
|
gWidth, gHeight,
|
||||||
x + pci->metrics.leftSideBearing,
|
x + pci->metrics.leftSideBearing,
|
||||||
|
|
|
@ -325,7 +325,6 @@ cwCreateGC(GCPtr pGC)
|
||||||
ScreenPtr pScreen = pGC->pScreen;
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
memset(pPriv, 0, sizeof(cwGCRec));
|
|
||||||
SCREEN_PROLOGUE(pScreen, CreateGC);
|
SCREEN_PROLOGUE(pScreen, CreateGC);
|
||||||
|
|
||||||
if ( (ret = (*pScreen->CreateGC)(pGC)) )
|
if ( (ret = (*pScreen->CreateGC)(pGC)) )
|
||||||
|
|
|
@ -446,7 +446,6 @@ damageCreateGC(GCPtr pGC)
|
||||||
damageGCPriv(pGC);
|
damageGCPriv(pGC);
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
pGC->pCompositeClip = 0;
|
|
||||||
unwrap (pScrPriv, pScreen, CreateGC);
|
unwrap (pScrPriv, pScreen, CreateGC);
|
||||||
if((ret = (*pScreen->CreateGC) (pGC))) {
|
if((ret = (*pScreen->CreateGC) (pGC))) {
|
||||||
pGCPriv->ops = NULL;
|
pGCPriv->ops = NULL;
|
||||||
|
@ -458,28 +457,6 @@ damageCreateGC(GCPtr pGC)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NOTUSED
|
|
||||||
static void
|
|
||||||
damageWrapGC (GCPtr pGC)
|
|
||||||
{
|
|
||||||
damageGCPriv(pGC);
|
|
||||||
|
|
||||||
pGCPriv->ops = NULL;
|
|
||||||
pGCPriv->funcs = pGC->funcs;
|
|
||||||
pGC->funcs = &damageGCFuncs;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
damageUnwrapGC (GCPtr pGC)
|
|
||||||
{
|
|
||||||
damageGCPriv(pGC);
|
|
||||||
|
|
||||||
pGC->funcs = pGCPriv->funcs;
|
|
||||||
if (pGCPriv->ops)
|
|
||||||
pGC->ops = pGCPriv->ops;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
|
#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
|
||||||
damageGCPriv(pGC); \
|
damageGCPriv(pGC); \
|
||||||
GCFuncs *oldFuncs = pGC->funcs; \
|
GCFuncs *oldFuncs = pGC->funcs; \
|
||||||
|
@ -1779,7 +1756,6 @@ static GCOps damageGCOps = {
|
||||||
damagePolyText16, damageImageText8,
|
damagePolyText16, damageImageText8,
|
||||||
damageImageText16, damageImageGlyphBlt,
|
damageImageText16, damageImageGlyphBlt,
|
||||||
damagePolyGlyphBlt, damagePushPixels,
|
damagePolyGlyphBlt, damagePushPixels,
|
||||||
{NULL} /* devPrivate */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -76,15 +76,6 @@ rootlessConfig.h to specify compile time options for its platform.
|
||||||
The following compile-time options are defined in
|
The following compile-time options are defined in
|
||||||
rootlessConfig.h:
|
rootlessConfig.h:
|
||||||
|
|
||||||
o ROOTLESS_GLOBAL_COORDS: This option controls the way that frame
|
|
||||||
coordinates are passed to the rootless implementation. If false,
|
|
||||||
the coordinates are passed per screen relative to the origin of
|
|
||||||
the screen the frame is currently on. Some implementations may
|
|
||||||
prefer to work in a single global coordinate space that spans all
|
|
||||||
screens. If this option is true, the coordinates are passed after
|
|
||||||
adding the coordinates of the screen origin and an overall offset of
|
|
||||||
(rootlessGlobalOffsetX, rootlessGlobalOffsetY).
|
|
||||||
|
|
||||||
o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of 24 and
|
o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of 24 and
|
||||||
32 bits per pixel, fb will overwrite the "unused" 8 bits to optimize
|
32 bits per pixel, fb will overwrite the "unused" 8 bits to optimize
|
||||||
drawing speed. If this is true, the alpha channel of frames is
|
drawing speed. If this is true, the alpha channel of frames is
|
||||||
|
@ -105,27 +96,13 @@ rootlessConfig.h:
|
||||||
during resizing and rely on the frame contents being preserved
|
during resizing and rely on the frame contents being preserved
|
||||||
accordingly.
|
accordingly.
|
||||||
|
|
||||||
o ROOTLESS_TRACK_DAMAGE: The generic rootless layer draws to the
|
|
||||||
frames' backing buffers and periodically flushes the modified
|
|
||||||
regions to the underlying window server. If this option is true,
|
|
||||||
the generic rootless layer will track these damaged regions.
|
|
||||||
Currently it uses the miRegion code and will not simplify damaged
|
|
||||||
regions even when updating a bounding region would be more
|
|
||||||
efficient. Some window systems provide a more efficient way to
|
|
||||||
track damaged regions. If this option is false, the rootless
|
|
||||||
implementation function DamageRects() is called whenever a
|
|
||||||
backing buffer is modified and the rootless implementation is
|
|
||||||
expected to track the damaged regions itself.
|
|
||||||
|
|
||||||
The following runtime options are defined in rootless.h:
|
The following runtime options are defined in rootless.h:
|
||||||
|
|
||||||
o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
|
o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify the global
|
||||||
used if ROOTLESS_GLOBAL_COORDS is true. They specify the global
|
|
||||||
offset that is applied to all screens when converting from
|
offset that is applied to all screens when converting from
|
||||||
screen-local to global coordinates.
|
screen-local to global coordinates.
|
||||||
|
|
||||||
o rootless_CopyBytes_threshold, rootless_FillBytes_threshold,
|
o rootless_CopyBytes_threshold, rootless_CopyWindow_threshold:
|
||||||
rootless_CompositePixels_threshold, rootless_CopyWindow_threshold:
|
|
||||||
The minimum number of bytes or pixels for which to use the rootless
|
The minimum number of bytes or pixels for which to use the rootless
|
||||||
implementation's respective acceleration function. The rootless
|
implementation's respective acceleration function. The rootless
|
||||||
acceleration functions are all optional so these will only be used
|
acceleration functions are all optional so these will only be used
|
||||||
|
@ -194,8 +171,7 @@ implementation to indicate the frame to operate on.
|
||||||
* initialized before calling except for pFrame->wid, which
|
* initialized before calling except for pFrame->wid, which
|
||||||
* is set by this function.
|
* is set by this function.
|
||||||
* pScreen Screen on which to place the new frame
|
* pScreen Screen on which to place the new frame
|
||||||
* newX, newY Position of the frame. These will be identical to pFrame-x,
|
* newX, newY Position of the frame.
|
||||||
* pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
|
|
||||||
* pNewShape Shape for the frame (in frame-local coordinates). NULL for
|
* pNewShape Shape for the frame (in frame-local coordinates). NULL for
|
||||||
* unshaped frames.
|
* unshaped frames.
|
||||||
*/
|
*/
|
||||||
|
@ -287,8 +263,7 @@ typedef void (*RootlessStartDrawingProc)
|
||||||
* is started again.
|
* is started again.
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* flush Flush drawing updates for this frame to the screen. This
|
* flush Flush drawing updates for this frame to the screen.
|
||||||
* will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessStopDrawingProc)
|
typedef void (*RootlessStopDrawingProc)
|
||||||
(RootlessFrameID wid, Bool flush);
|
(RootlessFrameID wid, Bool flush);
|
||||||
|
@ -299,15 +274,13 @@ typedef void (*RootlessStopDrawingProc)
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* pDamage Region containing all the changed pixels in frame-local
|
* pDamage Region containing all the changed pixels in frame-local
|
||||||
* coordinates. This is clipped to the window's clip. This
|
* coordinates. This is clipped to the window's clip.
|
||||||
* will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessUpdateRegionProc)
|
typedef void (*RootlessUpdateRegionProc)
|
||||||
(RootlessFrameID wid, RegionPtr pDamage);
|
(RootlessFrameID wid, RegionPtr pDamage);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mark damaged rectangles as requiring redisplay to screen.
|
* Mark damaged rectangles as requiring redisplay to screen.
|
||||||
* This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* nrects Number of damaged rectangles
|
* nrects Number of damaged rectangles
|
||||||
|
@ -347,44 +320,6 @@ typedef void (*RootlessCopyBytesProc)
|
||||||
const void *src, unsigned int srcRowBytes,
|
const void *src, unsigned int srcRowBytes,
|
||||||
void *dst, unsigned int dstRowBytes);
|
void *dst, unsigned int dstRowBytes);
|
||||||
|
|
||||||
/*
|
|
||||||
* Fill memory with 32-bit pattern. (Optional)
|
|
||||||
*
|
|
||||||
* width Bytes to fill per row
|
|
||||||
* height Number of rows
|
|
||||||
* value 32-bit pattern to fill with
|
|
||||||
* dst Destination data
|
|
||||||
* dstRowBytes Width of destination in bytes
|
|
||||||
*/
|
|
||||||
typedef void (*RootlessFillBytesProc)
|
|
||||||
(unsigned int width, unsigned int height, unsigned int value,
|
|
||||||
void *dst, unsigned int dstRowBytes);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Composite pixels from source and mask to destination. (Optional)
|
|
||||||
*
|
|
||||||
* width, height Size of area to composite to in pizels
|
|
||||||
* function Composite function built with RL_COMPOSITE_FUNCTION
|
|
||||||
* src Source data
|
|
||||||
* srcRowBytes Width of source in bytes (Passing NULL means source
|
|
||||||
* is a single pixel.
|
|
||||||
* mask Mask data
|
|
||||||
* maskRowBytes Width of mask in bytes
|
|
||||||
* dst Destination data
|
|
||||||
* dstRowBytes Width of destination in bytes
|
|
||||||
*
|
|
||||||
* For src and dst, the first element of the array is the color data. If
|
|
||||||
* the second element is non-null it implies there is alpha data (which
|
|
||||||
* may be meshed or planar). Data without alpha is assumed to be opaque.
|
|
||||||
*
|
|
||||||
* An X11 error code is returned.
|
|
||||||
*/
|
|
||||||
typedef int (*RootlessCompositePixelsProc)
|
|
||||||
(unsigned int width, unsigned int height, unsigned int function,
|
|
||||||
void *src[2], unsigned int srcRowBytes[2],
|
|
||||||
void *mask, unsigned int maskRowBytes,
|
|
||||||
void *dst[2], unsigned int dstRowBytes[2]);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy area in frame to another part of frame. (Optional)
|
* Copy area in frame to another part of frame. (Optional)
|
||||||
*
|
*
|
||||||
|
|
|
@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec {
|
||||||
|
|
||||||
PixmapPtr pixmap;
|
PixmapPtr pixmap;
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionRec damage;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int is_drawing :1; // Currently drawing?
|
unsigned int is_drawing :1; // Currently drawing?
|
||||||
unsigned int is_reorder_pending :1;
|
unsigned int is_reorder_pending :1;
|
||||||
unsigned int is_offscreen :1;
|
unsigned int is_offscreen :1;
|
||||||
|
@ -80,38 +76,14 @@ typedef struct _RootlessWindowRec {
|
||||||
|
|
||||||
|
|
||||||
/* Offset for screen-local to global coordinate transforms */
|
/* Offset for screen-local to global coordinate transforms */
|
||||||
#ifdef ROOTLESS_GLOBAL_COORDS
|
|
||||||
extern int rootlessGlobalOffsetX;
|
extern int rootlessGlobalOffsetX;
|
||||||
extern int rootlessGlobalOffsetY;
|
extern int rootlessGlobalOffsetY;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The minimum number of bytes or pixels for which to use the
|
/* The minimum number of bytes or pixels for which to use the
|
||||||
implementation's accelerated functions. */
|
implementation's accelerated functions. */
|
||||||
extern unsigned int rootless_CopyBytes_threshold;
|
extern unsigned int rootless_CopyBytes_threshold;
|
||||||
extern unsigned int rootless_FillBytes_threshold;
|
|
||||||
extern unsigned int rootless_CompositePixels_threshold;
|
|
||||||
extern unsigned int rootless_CopyWindow_threshold;
|
extern unsigned int rootless_CopyWindow_threshold;
|
||||||
|
|
||||||
/* Operations used by CompositePixels */
|
|
||||||
enum rl_composite_op_enum {
|
|
||||||
RL_COMPOSITE_SRC = 0,
|
|
||||||
RL_COMPOSITE_OVER,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Data formats for depth field and composite functions */
|
|
||||||
enum rl_depth_enum {
|
|
||||||
RL_DEPTH_NIL = 0, /* null source when compositing */
|
|
||||||
RL_DEPTH_ARGB8888,
|
|
||||||
RL_DEPTH_RGB555,
|
|
||||||
RL_DEPTH_A8, /* for masks when compositing */
|
|
||||||
RL_DEPTH_INDEX8,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Macro to form the composite function for CompositePixels */
|
|
||||||
#define RL_COMPOSITE_FUNCTION(op, src_depth, mask_depth, dest_depth) \
|
|
||||||
(((op) << 24) | ((src_depth) << 16) \
|
|
||||||
| ((mask_depth) << 8) | ((dest_depth) << 0))
|
|
||||||
|
|
||||||
/* Gravity for window contents during resizing */
|
/* Gravity for window contents during resizing */
|
||||||
enum rl_gravity_enum {
|
enum rl_gravity_enum {
|
||||||
RL_GRAVITY_NONE = 0, /* no gravity, fill everything */
|
RL_GRAVITY_NONE = 0, /* no gravity, fill everything */
|
||||||
|
@ -134,8 +106,7 @@ enum rl_gravity_enum {
|
||||||
* initialized before calling except for pFrame->wid, which
|
* initialized before calling except for pFrame->wid, which
|
||||||
* is set by this function.
|
* is set by this function.
|
||||||
* pScreen Screen on which to place the new frame
|
* pScreen Screen on which to place the new frame
|
||||||
* newX, newY Position of the frame. These will be identical to pFrame-x,
|
* newX, newY Position of the frame.
|
||||||
* pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
|
|
||||||
* pNewShape Shape for the frame (in frame-local coordinates). NULL for
|
* pNewShape Shape for the frame (in frame-local coordinates). NULL for
|
||||||
* unshaped frames.
|
* unshaped frames.
|
||||||
*/
|
*/
|
||||||
|
@ -227,8 +198,7 @@ typedef void (*RootlessStartDrawingProc)
|
||||||
* is started again.
|
* is started again.
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* flush Flush drawing updates for this frame to the screen. This
|
* flush Flush drawing updates for this frame to the screen.
|
||||||
* will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessStopDrawingProc)
|
typedef void (*RootlessStopDrawingProc)
|
||||||
(RootlessFrameID wid, Bool flush);
|
(RootlessFrameID wid, Bool flush);
|
||||||
|
@ -239,15 +209,13 @@ typedef void (*RootlessStopDrawingProc)
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* pDamage Region containing all the changed pixels in frame-lcoal
|
* pDamage Region containing all the changed pixels in frame-lcoal
|
||||||
* coordinates. This is clipped to the window's clip. This
|
* coordinates. This is clipped to the window's clip.
|
||||||
* will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessUpdateRegionProc)
|
typedef void (*RootlessUpdateRegionProc)
|
||||||
(RootlessFrameID wid, RegionPtr pDamage);
|
(RootlessFrameID wid, RegionPtr pDamage);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mark damaged rectangles as requiring redisplay to screen.
|
* Mark damaged rectangles as requiring redisplay to screen.
|
||||||
* This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* nrects Number of damaged rectangles
|
* nrects Number of damaged rectangles
|
||||||
|
@ -301,44 +269,6 @@ typedef void (*RootlessCopyBytesProc)
|
||||||
const void *src, unsigned int srcRowBytes,
|
const void *src, unsigned int srcRowBytes,
|
||||||
void *dst, unsigned int dstRowBytes);
|
void *dst, unsigned int dstRowBytes);
|
||||||
|
|
||||||
/*
|
|
||||||
* Fill memory with 32-bit pattern. (Optional)
|
|
||||||
*
|
|
||||||
* width Bytes to fill per row
|
|
||||||
* height Number of rows
|
|
||||||
* value 32-bit pattern to fill with
|
|
||||||
* dst Destination data
|
|
||||||
* dstRowBytes Width of destination in bytes
|
|
||||||
*/
|
|
||||||
typedef void (*RootlessFillBytesProc)
|
|
||||||
(unsigned int width, unsigned int height, unsigned int value,
|
|
||||||
void *dst, unsigned int dstRowBytes);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Composite pixels from source and mask to destination. (Optional)
|
|
||||||
*
|
|
||||||
* width, height Size of area to composite to in pizels
|
|
||||||
* function Composite function built with RL_COMPOSITE_FUNCTION
|
|
||||||
* src Source data
|
|
||||||
* srcRowBytes Width of source in bytes (Passing NULL means source
|
|
||||||
* is a single pixel.
|
|
||||||
* mask Mask data
|
|
||||||
* maskRowBytes Width of mask in bytes
|
|
||||||
* dst Destination data
|
|
||||||
* dstRowBytes Width of destination in bytes
|
|
||||||
*
|
|
||||||
* For src and dst, the first element of the array is the color data. If
|
|
||||||
* the second element is non-null it implies there is alpha data (which
|
|
||||||
* may be meshed or planar). Data without alpha is assumed to be opaque.
|
|
||||||
*
|
|
||||||
* An X11 error code is returned.
|
|
||||||
*/
|
|
||||||
typedef int (*RootlessCompositePixelsProc)
|
|
||||||
(unsigned int width, unsigned int height, unsigned int function,
|
|
||||||
void *src[2], unsigned int srcRowBytes[2],
|
|
||||||
void *mask, unsigned int maskRowBytes,
|
|
||||||
void *dst[2], unsigned int dstRowBytes[2]);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy area in frame to another part of frame. (Optional)
|
* Copy area in frame to another part of frame. (Optional)
|
||||||
*
|
*
|
||||||
|
@ -374,9 +304,7 @@ typedef struct _RootlessFrameProcs {
|
||||||
RootlessStartDrawingProc StartDrawing;
|
RootlessStartDrawingProc StartDrawing;
|
||||||
RootlessStopDrawingProc StopDrawing;
|
RootlessStopDrawingProc StopDrawing;
|
||||||
RootlessUpdateRegionProc UpdateRegion;
|
RootlessUpdateRegionProc UpdateRegion;
|
||||||
#ifndef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RootlessDamageRectsProc DamageRects;
|
RootlessDamageRectsProc DamageRects;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Optional frame functions */
|
/* Optional frame functions */
|
||||||
RootlessSwitchWindowProc SwitchWindow;
|
RootlessSwitchWindowProc SwitchWindow;
|
||||||
|
@ -386,8 +314,6 @@ typedef struct _RootlessFrameProcs {
|
||||||
|
|
||||||
/* Optional acceleration functions */
|
/* Optional acceleration functions */
|
||||||
RootlessCopyBytesProc CopyBytes;
|
RootlessCopyBytesProc CopyBytes;
|
||||||
RootlessFillBytesProc FillBytes;
|
|
||||||
RootlessCompositePixelsProc CompositePixels;
|
|
||||||
RootlessCopyWindowProc CopyWindow;
|
RootlessCopyWindowProc CopyWindow;
|
||||||
} RootlessFrameProcsRec, *RootlessFrameProcsPtr;
|
} RootlessFrameProcsRec, *RootlessFrameProcsPtr;
|
||||||
|
|
||||||
|
@ -397,13 +323,6 @@ typedef struct _RootlessFrameProcs {
|
||||||
*/
|
*/
|
||||||
Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs);
|
Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs);
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize acceleration for rootless mode on a given screen.
|
|
||||||
* Note: RootlessAccelInit() must be called before DamageSetup()
|
|
||||||
* and RootlessInit() must be called afterwards.
|
|
||||||
*/
|
|
||||||
Bool RootlessAccelInit(ScreenPtr pScreen);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the frame ID for the physical window displaying the given window.
|
* Return the frame ID for the physical window displaying the given window.
|
||||||
*
|
*
|
||||||
|
@ -426,8 +345,7 @@ void RootlessStartDrawing(WindowPtr pWindow);
|
||||||
/*
|
/*
|
||||||
* Finish drawing to a window's backing buffer.
|
* Finish drawing to a window's backing buffer.
|
||||||
*
|
*
|
||||||
* flush If true and ROOTLESS_TRACK_DAMAGE is set, damaged areas
|
* flush If true, damaged areas are flushed to the screen.
|
||||||
* are flushed to the screen.
|
|
||||||
*/
|
*/
|
||||||
void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
|
void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,9 @@
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
|
|
||||||
unsigned int rootless_CopyBytes_threshold = 0;
|
unsigned int rootless_CopyBytes_threshold = 0;
|
||||||
unsigned int rootless_FillBytes_threshold = 0;
|
|
||||||
unsigned int rootless_CompositePixels_threshold = 0;
|
|
||||||
unsigned int rootless_CopyWindow_threshold = 0;
|
unsigned int rootless_CopyWindow_threshold = 0;
|
||||||
#ifdef ROOTLESS_GLOBAL_COORDS
|
|
||||||
int rootlessGlobalOffsetX = 0;
|
int rootlessGlobalOffsetX = 0;
|
||||||
int rootlessGlobalOffsetY = 0;
|
int rootlessGlobalOffsetY = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};
|
RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};
|
||||||
|
|
||||||
|
@ -305,16 +301,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
if (in == rgnIN) {
|
if (in == rgnIN) {
|
||||||
/* clip totally contains pRegion */
|
/* clip totally contains pRegion */
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUnion(&winRec->damage,
|
|
||||||
&winRec->damage, (pRegion));
|
|
||||||
#else
|
|
||||||
SCREENREC(pWindow->drawable.pScreen)->imp->
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
DamageRects(winRec->wid,
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(pRegion),
|
RegionNumRects(pRegion),
|
||||||
RegionRects(pRegion),
|
RegionRects(pRegion),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
#endif
|
|
||||||
|
|
||||||
RootlessQueueRedisplay(pTop->drawable.pScreen);
|
RootlessQueueRedisplay(pTop->drawable.pScreen);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -331,16 +322,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
RegionNull(&clipped);
|
RegionNull(&clipped);
|
||||||
RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
|
RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUnion(&winRec->damage,
|
|
||||||
&winRec->damage, (pRegion));
|
|
||||||
#else
|
|
||||||
SCREENREC(pWindow->drawable.pScreen)->imp->
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
DamageRects(winRec->wid,
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(&clipped),
|
RegionNumRects(&clipped),
|
||||||
RegionRects(&clipped),
|
RegionRects(&clipped),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
#endif
|
|
||||||
|
|
||||||
RegionUninit(&clipped);
|
RegionUninit(&clipped);
|
||||||
|
|
||||||
|
@ -415,32 +401,7 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h)
|
||||||
void
|
void
|
||||||
RootlessRedisplay(WindowPtr pWindow)
|
RootlessRedisplay(WindowPtr pWindow)
|
||||||
{
|
{
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
|
|
||||||
RootlessWindowRec *winRec = WINREC(pWindow);
|
|
||||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
|
||||||
|
|
||||||
RootlessStopDrawing(pWindow, FALSE);
|
|
||||||
|
|
||||||
if (RegionNotEmpty(&winRec->damage)) {
|
|
||||||
RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n",
|
|
||||||
pWindow, winRec->width, winRec->height,
|
|
||||||
winRec->x, winRec->y);
|
|
||||||
|
|
||||||
// move region to window local coords
|
|
||||||
RegionTranslate(&winRec->damage,
|
|
||||||
-winRec->x, -winRec->y);
|
|
||||||
|
|
||||||
SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage);
|
|
||||||
|
|
||||||
RegionEmpty(&winRec->damage);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !ROOTLESS_TRACK_DAMAGE */
|
|
||||||
|
|
||||||
RootlessStopDrawing(pWindow, TRUE);
|
RootlessStopDrawing(pWindow, TRUE);
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,9 @@
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
# define ROOTLESS_GLOBAL_COORDS TRUE
|
|
||||||
# define ROOTLESS_PROTECT_ALPHA TRUE
|
# define ROOTLESS_PROTECT_ALPHA TRUE
|
||||||
# define ROOTLESS_REDISPLAY_DELAY 10
|
# define ROOTLESS_REDISPLAY_DELAY 10
|
||||||
# define ROOTLESS_RESIZE_GRAVITY TRUE
|
# define ROOTLESS_RESIZE_GRAVITY TRUE
|
||||||
# undef ROOTLESS_TRACK_DAMAGE
|
|
||||||
/*# define ROOTLESSDEBUG*/
|
/*# define ROOTLESSDEBUG*/
|
||||||
|
|
||||||
/* Bit mask for alpha channel with a particular number of bits per
|
/* Bit mask for alpha channel with a particular number of bits per
|
||||||
|
@ -52,11 +50,9 @@
|
||||||
|
|
||||||
#if defined(__CYGWIN__) || defined(WIN32)
|
#if defined(__CYGWIN__) || defined(WIN32)
|
||||||
|
|
||||||
# define ROOTLESS_GLOBAL_COORDS TRUE
|
|
||||||
# define ROOTLESS_PROTECT_ALPHA NO
|
# define ROOTLESS_PROTECT_ALPHA NO
|
||||||
# define ROOTLESS_REDISPLAY_DELAY 10
|
# define ROOTLESS_REDISPLAY_DELAY 10
|
||||||
# undef ROOTLESS_RESIZE_GRAVITY
|
# undef ROOTLESS_RESIZE_GRAVITY
|
||||||
# undef ROOTLESS_TRACK_DAMAGE
|
|
||||||
/*# define ROOTLESSDEBUG*/
|
/*# define ROOTLESSDEBUG*/
|
||||||
|
|
||||||
# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
|
# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
|
||||||
|
|
|
@ -148,9 +148,6 @@ static GCOps rootlessGCOps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
There are two issues we must contend with when drawing. These are
|
|
||||||
controlled with ROOTLESS_PROTECT_ALPHA and RootlessAccelInit().
|
|
||||||
|
|
||||||
If ROOTLESS_PROTECT_ALPHA is set, we have to make sure that the alpha
|
If ROOTLESS_PROTECT_ALPHA is set, we have to make sure that the alpha
|
||||||
channel of the on screen windows is always opaque. fb makes this harder
|
channel of the on screen windows is always opaque. fb makes this harder
|
||||||
than it would otherwise be by noticing that a planemask of 0x00ffffff
|
than it would otherwise be by noticing that a planemask of 0x00ffffff
|
||||||
|
@ -171,21 +168,8 @@ static GCOps rootlessGCOps = {
|
||||||
can do this when drawing op is GXcopy. We can also do this when copying
|
can do this when drawing op is GXcopy. We can also do this when copying
|
||||||
from another window since its alpha channel must also be opaque.
|
from another window since its alpha channel must also be opaque.
|
||||||
|
|
||||||
The other issue to consider is that the rootless implementation may
|
The three macros below are used to implement this. Drawing ops that can
|
||||||
provide accelerated drawing functions if RootlessAccelInit() is called.For
|
potentially have their planemask relaxed look like:
|
||||||
some drawing primitives we swap in rootless acceleration functions, which
|
|
||||||
use the accelerated drawing functions where possible.
|
|
||||||
|
|
||||||
Where both alpha protection and acceleration is used, it is even a bigger
|
|
||||||
win to relax the planemask to all ones because most accelerated drawing
|
|
||||||
functions can only be used in this case. However, even if we can't set
|
|
||||||
the planemask to all ones, we can still use the accelerated
|
|
||||||
CompositePixels function for GXcopy if it is a forward copy. This is
|
|
||||||
mainly intended for copying from pixmaps to windows. The CompositePixels
|
|
||||||
operation used sets alpha to 0xFF during the copy.
|
|
||||||
|
|
||||||
The three macros below are used to implement this, potentially accelerated
|
|
||||||
drawing ops look something like this:
|
|
||||||
|
|
||||||
OP {
|
OP {
|
||||||
GC_SAVE(gc);
|
GC_SAVE(gc);
|
||||||
|
@ -285,16 +269,6 @@ canAccelFill(DrawablePtr pDraw, GCPtr pGC)
|
||||||
return canAccelBlit(pDraw, pGC);
|
return canAccelBlit(pDraw, pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
|
||||||
boxBytes(DrawablePtr pDraw, BoxRec *box)
|
|
||||||
{
|
|
||||||
unsigned int pixels;
|
|
||||||
|
|
||||||
pixels = (box->x2 - box->x1) * (box->y2 - box->y1);
|
|
||||||
|
|
||||||
return pixels * (pDraw->bitsPerPixel >> 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Screen function to create a graphics context
|
* Screen function to create a graphics context
|
||||||
|
@ -477,8 +451,7 @@ RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -584,15 +557,11 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC,
|
||||||
RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst);
|
RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst);
|
||||||
|
|
||||||
if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) {
|
if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) {
|
||||||
unsigned int bytes;
|
|
||||||
|
|
||||||
/* If both source and dest are windows, and we're doing
|
/* If both source and dest are windows, and we're doing
|
||||||
a simple copy operation, we can remove the alpha-protecting
|
a simple copy operation, we can remove the alpha-protecting
|
||||||
planemask (since source has opaque alpha as well) */
|
planemask (since source has opaque alpha as well) */
|
||||||
|
|
||||||
bytes = w * h * (pSrc->depth >> 3);
|
if (canAccelBlit(pSrc, pGC))
|
||||||
|
|
||||||
if (bytes >= rootless_CopyBytes_threshold && canAccelBlit(pSrc, pGC))
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1064,8 +1033,7 @@ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1117,8 +1085,7 @@ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1170,8 +1137,7 @@ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1221,8 +1187,7 @@ static void RootlessImageText8(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1309,8 +1274,7 @@ static void RootlessImageText16(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
@ -1408,8 +1372,7 @@ static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC,
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
||||||
if (canAccelFill(dst, pGC) &&
|
if (canAccelFill(dst, pGC))
|
||||||
boxBytes(dst, &box) >= rootless_FillBytes_threshold)
|
|
||||||
{
|
{
|
||||||
GC_UNSET_PM(pGC, dst);
|
GC_UNSET_PM(pGC, dst);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,15 +51,10 @@ extern Bool no_configure_window;
|
||||||
#include "rootlessCommon.h"
|
#include "rootlessCommon.h"
|
||||||
#include "rootlessWindow.h"
|
#include "rootlessWindow.h"
|
||||||
|
|
||||||
#ifdef ROOTLESS_GLOBAL_COORDS
|
|
||||||
#define SCREEN_TO_GLOBAL_X \
|
#define SCREEN_TO_GLOBAL_X \
|
||||||
(pScreen->x + rootlessGlobalOffsetX)
|
(pScreen->x + rootlessGlobalOffsetX)
|
||||||
#define SCREEN_TO_GLOBAL_Y \
|
#define SCREEN_TO_GLOBAL_Y \
|
||||||
(pScreen->y + rootlessGlobalOffsetY)
|
(pScreen->y + rootlessGlobalOffsetY)
|
||||||
#else
|
|
||||||
#define SCREEN_TO_GLOBAL_X 0
|
|
||||||
#define SCREEN_TO_GLOBAL_Y 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFINE_ATOM_HELPER(func,atom_name) \
|
#define DEFINE_ATOM_HELPER(func,atom_name) \
|
||||||
static Atom func (void) { \
|
static Atom func (void) { \
|
||||||
|
@ -180,11 +175,6 @@ static void
|
||||||
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
||||||
{
|
{
|
||||||
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
|
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUninit(&winRec->damage);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
free(winRec);
|
free(winRec);
|
||||||
SETWINREC(pWin, NULL);
|
SETWINREC(pWin, NULL);
|
||||||
}
|
}
|
||||||
|
@ -341,15 +331,6 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y)
|
||||||
|
|
||||||
winRec->pixmap->devPrivate.ptr = winRec->pixelData;
|
winRec->pixmap->devPrivate.ptr = winRec->pixelData;
|
||||||
SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw);
|
SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw);
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
// Move damaged region to correspond to new window position
|
|
||||||
if (RegionNotEmpty(&winRec->damage)) {
|
|
||||||
RegionTranslate(&winRec->damage,
|
|
||||||
x - bw - winRec->x,
|
|
||||||
y - bw - winRec->y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,10 +362,6 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
|
||||||
winRec->width = d->width + 2*bw;
|
winRec->width = d->width + 2*bw;
|
||||||
winRec->height = d->height + 2*bw;
|
winRec->height = d->height + 2*bw;
|
||||||
winRec->borderWidth = bw;
|
winRec->borderWidth = bw;
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionNull(&winRec->damage);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue