Remove dead NEED_DBE_BUF_BITS code.
This commit is contained in:
parent
2e3cc861f9
commit
f7c5aa0dc0
31
dbe/dbe.c
31
dbe/dbe.c
|
@ -79,36 +79,6 @@ static int dbeErrorBase;
|
|||
*/
|
||||
static Bool firstRegistrationPass = TRUE;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* DBE DIX Procedure: DbeValidateBuffer
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function is called from VALIDATE_DRAWABLE_AND_GC and from
|
||||
* various places in dispatch.c if the server has been compiled with
|
||||
* the flags -DNEED_DBE_BUF_BITS and -DNEED_DBE_BUF_VALIDATE.
|
||||
* When pWin->dstBuffer changes, this function will be called with pWin
|
||||
* as the first argument, the drawable ID that was specified as the
|
||||
* second argument (could be a back buffer id), and True for the third
|
||||
* argument.
|
||||
* When pWin->srcBuffer changes, the third argument will be False, and
|
||||
* the first two arguments are as described for dstBuffer.
|
||||
*
|
||||
* This function should prepare the hardware to access the specified
|
||||
* buffer for reads (if dstbuf is False) or writes (if dstbuf is True).
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbeValidateBuffer(WindowPtr pWin, XID drawID, Bool dstbuf)
|
||||
{
|
||||
DbeScreenPrivPtr pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin);
|
||||
if (pDbeScreenPriv->ValidateBuffer)
|
||||
(*pDbeScreenPriv->ValidateBuffer)(pWin, drawID, dstbuf);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -317,7 +287,6 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens)
|
|||
pDbeScreenPriv->EndIdiom = NULL;
|
||||
pDbeScreenPriv->WinPrivDelete = NULL;
|
||||
pDbeScreenPriv->ResetProc = NULL;
|
||||
pDbeScreenPriv->ValidateBuffer = NULL;
|
||||
|
||||
(*nStubbedScreens)++;
|
||||
|
||||
|
|
|
@ -221,11 +221,6 @@ typedef struct _DbeScreenPrivRec
|
|||
void (*ResetProc)(
|
||||
ScreenPtr /*pScreen*/
|
||||
);
|
||||
void (*ValidateBuffer)(
|
||||
WindowPtr /*pWin*/,
|
||||
XID /*bufId*/,
|
||||
Bool /*dstbuffer*/
|
||||
);
|
||||
|
||||
/* Device-specific private information.
|
||||
*/
|
||||
|
|
|
@ -759,11 +759,6 @@ miDbeResetProc(ScreenPtr pScreen)
|
|||
|
||||
} /* miDbeResetProc() */
|
||||
|
||||
static void
|
||||
miDbeNopValidateBuffer(WindowPtr pWin, XID bufId, Bool dstbuffer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -821,9 +816,6 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
|
|||
pDbeScreenPriv->ResetProc = miDbeResetProc;
|
||||
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
|
||||
|
||||
/* The mi implementation doesn't need buffer validation. */
|
||||
pDbeScreenPriv->ValidateBuffer = miDbeNopValidateBuffer;
|
||||
|
||||
return(TRUE);
|
||||
|
||||
} /* miDbeInit() */
|
||||
|
|
|
@ -1803,8 +1803,6 @@ ProcCopyArea(ClientPtr client)
|
|||
else
|
||||
pSrc = pDst;
|
||||
|
||||
SET_DBE_SRCBUF(pSrc, stuff->srcDrawable);
|
||||
|
||||
pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY,
|
||||
stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY);
|
||||
|
@ -1847,8 +1845,6 @@ ProcCopyPlane(ClientPtr client)
|
|||
else
|
||||
psrcDraw = pdstDraw;
|
||||
|
||||
SET_DBE_SRCBUF(psrcDraw, stuff->srcDrawable);
|
||||
|
||||
/* Check to see if stuff->bitPlane has exactly ONE good bit set */
|
||||
if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
|
||||
(stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
|
||||
|
@ -2208,8 +2204,6 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
|
|||
xgi.visual = None;
|
||||
}
|
||||
|
||||
SET_DBE_SRCBUF(pDraw, drawable);
|
||||
|
||||
xgi.type = X_Reply;
|
||||
xgi.sequenceNumber = client->sequence;
|
||||
xgi.depth = pDraw->depth;
|
||||
|
|
|
@ -297,10 +297,6 @@ SetWindowToDefaults(WindowPtr pWin)
|
|||
pWin->deliverableEvents = 0;
|
||||
pWin->dontPropagate = 0;
|
||||
pWin->forcedBS = FALSE;
|
||||
#ifdef NEED_DBE_BUF_BITS
|
||||
pWin->srcBuffer = DBE_FRONT_BUFFER;
|
||||
pWin->dstBuffer = DBE_FRONT_BUFFER;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
pWin->redirectDraw = 0;
|
||||
#endif
|
||||
|
|
|
@ -81,59 +81,6 @@ SOFTWARE.
|
|||
return(BadIDChoice);\
|
||||
}
|
||||
|
||||
/*
|
||||
* We think that most hardware implementations of DBE will want
|
||||
* LookupID*(dbe_back_buffer_id) to return the window structure that the
|
||||
* id is a back buffer for. Since both front and back buffers will
|
||||
* return the same structure, you need to be able to distinguish
|
||||
* somewhere what kind of buffer (front/back) was being asked for, so
|
||||
* that ddx can render to the right place. That's the problem that the
|
||||
* following code solves. Note: we couldn't embed this in the LookupID*
|
||||
* functions because the VALIDATE_DRAWABLE_AND_GC macro often circumvents
|
||||
* those functions by checking a one-element cache. That's why we're
|
||||
* mucking with VALIDATE_DRAWABLE_AND_GC.
|
||||
*
|
||||
* If you put -DNEED_DBE_BUF_BITS into PervasiveDBEDefines, the window
|
||||
* structure will have two additional bits defined, srcBuffer and
|
||||
* dstBuffer, and their values will be maintained via the macros
|
||||
* SET_DBE_DSTBUF and SET_DBE_SRCBUF (below). If you also
|
||||
* put -DNEED_DBE_BUF_VALIDATE into PervasiveDBEDefines, the function
|
||||
* DbeValidateBuffer will be called any time the bits change to give you
|
||||
* a chance to do some setup. See the DBE code for more details on this
|
||||
* function. We put in these levels of conditionality so that you can do
|
||||
* just what you need to do, and no more. If neither of these defines
|
||||
* are used, the bits won't be there, and VALIDATE_DRAWABLE_AND_GC will
|
||||
* be unchanged. dpw
|
||||
*/
|
||||
|
||||
#if defined(NEED_DBE_BUF_BITS)
|
||||
#define SET_DBE_DSTBUF(_pDraw, _drawID) \
|
||||
SET_DBE_BUF(_pDraw, _drawID, dstBuffer, TRUE)
|
||||
#define SET_DBE_SRCBUF(_pDraw, _drawID) \
|
||||
SET_DBE_BUF(_pDraw, _drawID, srcBuffer, FALSE)
|
||||
#if defined (NEED_DBE_BUF_VALIDATE)
|
||||
#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
|
||||
if (_pDraw->type == DRAWABLE_WINDOW)\
|
||||
{\
|
||||
int thisbuf = (_pDraw->id == _drawID);\
|
||||
if (thisbuf != ((WindowPtr)_pDraw)->_whichBuffer)\
|
||||
{\
|
||||
((WindowPtr)_pDraw)->_whichBuffer = thisbuf;\
|
||||
DbeValidateBuffer((WindowPtr)_pDraw, _drawID, _dstbuf);\
|
||||
}\
|
||||
}
|
||||
#else /* want buffer bits, but don't need to call DbeValidateBuffer */
|
||||
#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
|
||||
if (_pDraw->type == DRAWABLE_WINDOW)\
|
||||
{\
|
||||
((WindowPtr)_pDraw)->_whichBuffer = (_pDraw->id == _drawID);\
|
||||
}
|
||||
#endif /* NEED_DBE_BUF_VALIDATE */
|
||||
#else /* don't want buffer bits in window */
|
||||
#define SET_DBE_DSTBUF(_pDraw, _drawID) /**/
|
||||
#define SET_DBE_SRCBUF(_pDraw, _drawID) /**/
|
||||
#endif /* NEED_DBE_BUF_BITS */
|
||||
|
||||
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\
|
||||
if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
|
||||
(client->lastDrawableID != drawID))\
|
||||
|
@ -158,7 +105,6 @@ SOFTWARE.
|
|||
pGC = client->lastGC;\
|
||||
pDraw = client->lastDrawable;\
|
||||
}\
|
||||
SET_DBE_DSTBUF(pDraw, drawID);\
|
||||
if (pGC->serialNumber != pDraw->serialNumber)\
|
||||
ValidateGC(pDraw, pGC);
|
||||
|
||||
|
|
|
@ -129,12 +129,6 @@ typedef struct _Window {
|
|||
unsigned viewable:1; /* realized && InputOutput */
|
||||
unsigned dontPropagate:3;/* index into DontPropagateMasks */
|
||||
unsigned forcedBS:1; /* system-supplied backingStore */
|
||||
#ifdef NEED_DBE_BUF_BITS
|
||||
#define DBE_FRONT_BUFFER 1
|
||||
#define DBE_BACK_BUFFER 0
|
||||
unsigned dstBuffer:1; /* destination buffer for rendering */
|
||||
unsigned srcBuffer:1; /* source buffer for rendering */
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
unsigned redirectDraw:1; /* rendering is redirected from here */
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue