Remove readmask from screen block/wakeup handler
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
410bc04748
commit
fb0802113b
|
@ -55,13 +55,13 @@ compScreenUpdate(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
compBlockHandler(ScreenPtr pScreen, void *pTimeout, void *pReadmask)
|
compBlockHandler(ScreenPtr pScreen, void *pTimeout)
|
||||||
{
|
{
|
||||||
CompScreenPtr cs = GetCompScreen(pScreen);
|
CompScreenPtr cs = GetCompScreen(pScreen);
|
||||||
|
|
||||||
pScreen->BlockHandler = cs->BlockHandler;
|
pScreen->BlockHandler = cs->BlockHandler;
|
||||||
compScreenUpdate(pScreen);
|
compScreenUpdate(pScreen);
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, pTimeout);
|
||||||
|
|
||||||
/* Next damage will restore the block handler */
|
/* Next damage will restore the block handler */
|
||||||
cs->BlockHandler = NULL;
|
cs->BlockHandler = NULL;
|
||||||
|
|
|
@ -385,16 +385,13 @@ BlockHandler(void *pTimeout, void *pReadmask)
|
||||||
++inHandler;
|
++inHandler;
|
||||||
for (i = 0; i < numHandlers; i++)
|
for (i = 0; i < numHandlers; i++)
|
||||||
if (!handlers[i].deleted)
|
if (!handlers[i].deleted)
|
||||||
(*handlers[i].BlockHandler) (handlers[i].blockData,
|
(*handlers[i].BlockHandler) (handlers[i].blockData, pTimeout, pReadmask);
|
||||||
pTimeout, pReadmask);
|
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numGPUScreens; i++)
|
for (i = 0; i < screenInfo.numGPUScreens; i++)
|
||||||
(*screenInfo.gpuscreens[i]->BlockHandler) (screenInfo.gpuscreens[i],
|
(*screenInfo.gpuscreens[i]->BlockHandler) (screenInfo.gpuscreens[i], pTimeout);
|
||||||
pTimeout, pReadmask);
|
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
(*screenInfo.screens[i]->BlockHandler) (screenInfo.screens[i],
|
(*screenInfo.screens[i]->BlockHandler) (screenInfo.screens[i], pTimeout);
|
||||||
pTimeout, pReadmask);
|
|
||||||
|
|
||||||
if (handlerDeleted) {
|
if (handlerDeleted) {
|
||||||
for (i = 0; i < numHandlers;)
|
for (i = 0; i < numHandlers;)
|
||||||
|
@ -422,15 +419,12 @@ WakeupHandler(int result, void *pReadmask)
|
||||||
|
|
||||||
++inHandler;
|
++inHandler;
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
(*screenInfo.screens[i]->WakeupHandler) (screenInfo.screens[i],
|
(*screenInfo.screens[i]->WakeupHandler) (screenInfo.screens[i], result);
|
||||||
result, pReadmask);
|
|
||||||
for (i = 0; i < screenInfo.numGPUScreens; i++)
|
for (i = 0; i < screenInfo.numGPUScreens; i++)
|
||||||
(*screenInfo.gpuscreens[i]->WakeupHandler) (screenInfo.gpuscreens[i],
|
(*screenInfo.gpuscreens[i]->WakeupHandler) (screenInfo.gpuscreens[i], result);
|
||||||
result, pReadmask);
|
|
||||||
for (i = numHandlers - 1; i >= 0; i--)
|
for (i = numHandlers - 1; i >= 0; i--)
|
||||||
if (!handlers[i].deleted)
|
if (!handlers[i].deleted)
|
||||||
(*handlers[i].WakeupHandler) (handlers[i].blockData,
|
(*handlers[i].WakeupHandler) (handlers[i].blockData, result, pReadmask);
|
||||||
result, pReadmask);
|
|
||||||
if (handlerDeleted) {
|
if (handlerDeleted) {
|
||||||
for (i = 0; i < numHandlers;)
|
for (i = 0; i < numHandlers;)
|
||||||
if (handlers[i].deleted) {
|
if (handlers[i].deleted) {
|
||||||
|
|
|
@ -210,7 +210,7 @@ A sample InitInput implementation is shown below.
|
||||||
<literallayout class="monospaced">
|
<literallayout class="monospaced">
|
||||||
InitInput(argc,argv)
|
InitInput(argc,argv)
|
||||||
{
|
{
|
||||||
int i, numdevs, ReadInput();
|
int i, numdevs;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
LocalDevice localdevs[LOCAL_MAX_DEVS];
|
LocalDevice localdevs[LOCAL_MAX_DEVS];
|
||||||
DeviceProc kbdproc, ptrproc, extproc;
|
DeviceProc kbdproc, ptrproc, extproc;
|
||||||
|
@ -223,12 +223,6 @@ InitInput(argc,argv)
|
||||||
|
|
||||||
open_input_devices (&numdevs, localdevs);
|
open_input_devices (&numdevs, localdevs);
|
||||||
|
|
||||||
/**************************************************************
|
|
||||||
* Register a WakeupHandler to handle input when it is generated.
|
|
||||||
***************************************************************/
|
|
||||||
|
|
||||||
RegisterBlockAndWakeupHandlers (NoopDDA, ReadInput, NULL);
|
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
* Register the input devices with DIX.
|
* Register the input devices with DIX.
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
|
@ -674,30 +674,22 @@ If WaitForSomething() decides it is about to do something that might block
|
||||||
routine called BlockHandler().
|
routine called BlockHandler().
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void BlockHandler(pTimeout, pReadmask)
|
void BlockHandler(void *pTimeout)
|
||||||
pointer pTimeout;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
The types of the arguments are for agreement between the OS and DDX
|
The types of the arguments are for agreement between the OS and DDX
|
||||||
implementations, but the pTimeout is a pointer to the information
|
implementations, but the pTimeout is a pointer to the information
|
||||||
determining how long the block is allowed to last, and the
|
determining how long the block is allowed to last.
|
||||||
pReadmask is a pointer to the information describing the descriptors
|
|
||||||
that will be waited on.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the sample server, pTimeout is a pointer, and pReadmask is
|
In the sample server, pTimeout is a pointer.
|
||||||
the address of the select() mask for reading.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The DIX BlockHandler() iterates through the Screens, for each one calling
|
The DIX BlockHandler() iterates through the Screens, for each one calling
|
||||||
its BlockHandler. A BlockHandler is declared thus:
|
its BlockHandler. A BlockHandler is declared thus:
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void xxxBlockHandler(pScreen, pTimeout, pReadmask)
|
void xxxBlockHandler(ScreenPtr pScreen, void *pTimeout)
|
||||||
ScreenPtr pScreen;
|
|
||||||
pointer pTimeout;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
The arguments are a pointer to the Screen, and the arguments to the
|
The arguments are a pointer to the Screen, and the arguments to the
|
||||||
|
@ -709,27 +701,20 @@ block, even if it didn't actually block, it must call the DIX routine
|
||||||
WakeupHandler().
|
WakeupHandler().
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void WakeupHandler(result, pReadmask)
|
void WakeupHandler(int result)
|
||||||
int result;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
Once again, the types are not specified by DIX. The result is the
|
Once again, the types are not specified by DIX. The result is the
|
||||||
success indicator for the thing that (may have) blocked,
|
success indicator for the thing that (may have) blocked.
|
||||||
and the pReadmask is a mask of the descriptors that came active.
|
In the sample server, result is the result from select() (or equivalent
|
||||||
In the sample server, result is the result from select() (or equivalent
|
operating system function).
|
||||||
operating system function), and pReadmask is
|
|
||||||
the address of the select() mask for reading.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The DIX WakeupHandler() calls each Screen's
|
The DIX WakeupHandler() calls each Screen's
|
||||||
WakeupHandler. A WakeupHandler is declared thus:
|
WakeupHandler. A WakeupHandler is declared thus:
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void xxxWakeupHandler(pScreen, result, pReadmask)
|
void xxxWakeupHandler(ScreenPtr pScreen, int result)
|
||||||
ScreenPtr pScreen;
|
|
||||||
unsigned long result;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
The arguments are the Screen, of the Screen, and the arguments to
|
The arguments are the Screen, of the Screen, and the arguments to
|
||||||
|
@ -741,8 +726,8 @@ block and wakeup handlers (only together) using:
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
|
Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
|
||||||
BlockHandlerProcPtr blockHandler;
|
ServerBlockHandlerProcPtr blockHandler;
|
||||||
WakeupHandlerProcPtr wakeupHandler;
|
ServerWakeupHandlerProcPtr wakeupHandler;
|
||||||
pointer blockData;
|
pointer blockData;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -752,8 +737,8 @@ memory. To remove a registered Block handler at other than server reset time
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
|
RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
|
||||||
BlockHandlerProcPtr blockHandler;
|
ServerBlockHandlerProcPtr blockHandler;
|
||||||
WakeupHandlerProcPtr wakeupHandler;
|
ServerWakeupHandlerProcPtr wakeupHandler;
|
||||||
pointer blockData;
|
pointer blockData;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -761,18 +746,15 @@ All three arguments must match the values passed to
|
||||||
RegisterBlockAndWakeupHandlers.
|
RegisterBlockAndWakeupHandlers.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
These registered block handlers are called after the per-screen handlers:
|
These registered block handlers are called before the per-screen handlers:
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
void (*BlockHandler) (blockData, pptv, pReadmask)
|
void (*ServerBlockHandler) (void *blockData, void *pTimeout)
|
||||||
pointer blockData;
|
|
||||||
OsTimerPtr pptv;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Sometimes block handlers need to adjust the time in a OSTimePtr structure,
|
Sometimes block handlers need to adjust the time referenced by pTimeout,
|
||||||
which on UNIX family systems is generally represented by a struct timeval
|
which on UNIX family systems is generally represented by a struct timeval
|
||||||
consisting of seconds and microseconds in 32 bit values.
|
consisting of seconds and microseconds in 32 bit values.
|
||||||
As a convenience to reduce error prone struct timeval computations which
|
As a convenience to reduce error prone struct timeval computations which
|
||||||
|
@ -780,20 +762,17 @@ require modulus arithmetic and correct overflow behavior in the face of
|
||||||
millisecond wrapping through 32 bits,
|
millisecond wrapping through 32 bits,
|
||||||
<blockquote><programlisting>
|
<blockquote><programlisting>
|
||||||
|
|
||||||
void AdjustWaitForDelay(pointer /*waitTime*, unsigned long /* newdelay */)
|
void AdjustWaitForDelay(void *pTimeout, unsigned long newdelay)
|
||||||
|
|
||||||
</programlisting></blockquote>
|
</programlisting></blockquote>
|
||||||
has been provided.
|
has been provided.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Any wakeup handlers registered with RegisterBlockAndWakeupHandlers will
|
Any wakeup handlers registered with RegisterBlockAndWakeupHandlers will
|
||||||
be called before the Screen handlers:
|
be called after the Screen handlers:
|
||||||
<blockquote><programlisting>
|
<blockquote><programlisting>
|
||||||
|
|
||||||
void (*WakeupHandler) (blockData, err, pReadmask)
|
void (*ServerWakeupHandler) (void *blockData, int result)
|
||||||
pointer blockData;
|
|
||||||
int err;
|
|
||||||
pointer pReadmask;
|
|
||||||
</programlisting></blockquote>
|
</programlisting></blockquote>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|
10
exa/exa.c
10
exa/exa.c
|
@ -702,8 +702,7 @@ exaCreateScreenResources(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ExaBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
ExaBlockHandler(ScreenPtr pScreen, void *pTimeout)
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
|
|
||||||
|
@ -712,7 +711,7 @@ ExaBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
||||||
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
|
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
|
||||||
|
|
||||||
unwrap(pExaScr, pScreen, BlockHandler);
|
unwrap(pExaScr, pScreen, BlockHandler);
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, pTimeout);
|
||||||
wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler);
|
wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler);
|
||||||
|
|
||||||
/* The rest only applies to classic EXA */
|
/* The rest only applies to classic EXA */
|
||||||
|
@ -732,13 +731,12 @@ ExaBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ExaWakeupHandler(ScreenPtr pScreen, unsigned long result,
|
ExaWakeupHandler(ScreenPtr pScreen, int result)
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
|
|
||||||
unwrap(pExaScr, pScreen, WakeupHandler);
|
unwrap(pExaScr, pScreen, WakeupHandler);
|
||||||
(*pScreen->WakeupHandler) (pScreen, result, pReadmask);
|
(*pScreen->WakeupHandler) (pScreen, result);
|
||||||
wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler);
|
wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler);
|
||||||
|
|
||||||
if (result == 0 && pExaScr->numOffscreenAvailable > 1) {
|
if (result == 0 && pExaScr->numOffscreenAvailable > 1) {
|
||||||
|
|
|
@ -257,7 +257,7 @@ glamor_block_handler(ScreenPtr screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_glamor_block_handler(ScreenPtr screen, void *timeout, void *readmask)
|
_glamor_block_handler(ScreenPtr screen, void *timeout)
|
||||||
{
|
{
|
||||||
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ _glamor_block_handler(ScreenPtr screen, void *timeout, void *readmask)
|
||||||
glFlush();
|
glFlush();
|
||||||
|
|
||||||
screen->BlockHandler = glamor_priv->saved_procs.block_handler;
|
screen->BlockHandler = glamor_priv->saved_procs.block_handler;
|
||||||
screen->BlockHandler(screen, timeout, readmask);
|
screen->BlockHandler(screen, timeout);
|
||||||
glamor_priv->saved_procs.block_handler = screen->BlockHandler;
|
glamor_priv->saved_procs.block_handler = screen->BlockHandler;
|
||||||
screen->BlockHandler = _glamor_block_handler;
|
screen->BlockHandler = _glamor_block_handler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,14 +347,14 @@ ephyrEventWorkProc(ClientPtr client, void *closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ephyrScreenBlockHandler(ScreenPtr pScreen, void *timeout, void *pRead)
|
ephyrScreenBlockHandler(ScreenPtr pScreen, void *timeout)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
KdScreenInfo *screen = pScreenPriv->screen;
|
KdScreenInfo *screen = pScreenPriv->screen;
|
||||||
EphyrScrPriv *scrpriv = screen->driver;
|
EphyrScrPriv *scrpriv = screen->driver;
|
||||||
|
|
||||||
pScreen->BlockHandler = scrpriv->BlockHandler;
|
pScreen->BlockHandler = scrpriv->BlockHandler;
|
||||||
(*pScreen->BlockHandler)(pScreen, timeout, pRead);
|
(*pScreen->BlockHandler)(pScreen, timeout);
|
||||||
scrpriv->BlockHandler = pScreen->BlockHandler;
|
scrpriv->BlockHandler = pScreen->BlockHandler;
|
||||||
pScreen->BlockHandler = ephyrScreenBlockHandler;
|
pScreen->BlockHandler = ephyrScreenBlockHandler;
|
||||||
|
|
||||||
|
|
|
@ -527,12 +527,10 @@ void
|
||||||
KdScreenToPointerCoords(int *x, int *y);
|
KdScreenToPointerCoords(int *x, int *y);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
KdBlockHandler(ScreenPtr pScreen, void *timeout);
|
||||||
KdBlockHandler(ScreenPtr pScreen, void *timeout, void *readmask);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
KdWakeupHandler(ScreenPtr pScreen, int result);
|
||||||
KdWakeupHandler(ScreenPtr pScreen, unsigned long result, void *readmask);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
KdDisableInput(void);
|
KdDisableInput(void);
|
||||||
|
|
|
@ -1961,7 +1961,7 @@ _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
KdBlockHandler(ScreenPtr pScreen, void *timeo, void *readmask)
|
KdBlockHandler(ScreenPtr pScreen, void *timeo)
|
||||||
{
|
{
|
||||||
KdPointerInfo *pi;
|
KdPointerInfo *pi;
|
||||||
int myTimeout = 0;
|
int myTimeout = 0;
|
||||||
|
@ -1987,7 +1987,7 @@ KdBlockHandler(ScreenPtr pScreen, void *timeo, void *readmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
KdWakeupHandler(ScreenPtr pScreen, unsigned long lresult, void *readmask)
|
KdWakeupHandler(ScreenPtr pScreen, int result)
|
||||||
{
|
{
|
||||||
KdPointerInfo *pi;
|
KdPointerInfo *pi;
|
||||||
|
|
||||||
|
|
|
@ -265,23 +265,21 @@ VGAarbiterCloseScreen(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
VGAarbiterBlockHandler(ScreenPtr pScreen,
|
VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout)
|
||||||
void *pTimeout, void *pReadmask)
|
|
||||||
{
|
{
|
||||||
SCREEN_PROLOG(BlockHandler);
|
SCREEN_PROLOG(BlockHandler);
|
||||||
VGAGet(pScreen);
|
VGAGet(pScreen);
|
||||||
pScreen->BlockHandler(pScreen, pTimeout, pReadmask);
|
pScreen->BlockHandler(pScreen, pTimeout);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
|
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
VGAarbiterWakeupHandler(ScreenPtr pScreen, unsigned long result,
|
VGAarbiterWakeupHandler(ScreenPtr pScreen, int result)
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
SCREEN_PROLOG(WakeupHandler);
|
SCREEN_PROLOG(WakeupHandler);
|
||||||
VGAGet(pScreen);
|
VGAGet(pScreen);
|
||||||
pScreen->WakeupHandler(pScreen, result, pReadmask);
|
pScreen->WakeupHandler(pScreen, result);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
|
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,10 +146,8 @@ typedef struct _VGAarbiterGC {
|
||||||
} VGAarbiterGCRec, *VGAarbiterGCPtr;
|
} VGAarbiterGCRec, *VGAarbiterGCPtr;
|
||||||
|
|
||||||
/* Screen funcs */
|
/* Screen funcs */
|
||||||
static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout);
|
||||||
void *pReadmask);
|
static void VGAarbiterWakeupHandler(ScreenPtr pScreen, int result);
|
||||||
static void VGAarbiterWakeupHandler(ScreenPtr pScreen,
|
|
||||||
unsigned long result, void *pReadmask);
|
|
||||||
static Bool VGAarbiterCloseScreen(ScreenPtr pScreen);
|
static Bool VGAarbiterCloseScreen(ScreenPtr pScreen);
|
||||||
static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w,
|
static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w,
|
||||||
int h, unsigned int format,
|
int h, unsigned int format,
|
||||||
|
|
|
@ -1676,8 +1676,7 @@ DRIWakeupHandler(void *wakeupData, int result, void *pReadmask)
|
||||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.WakeupHandler)
|
if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.WakeupHandler)
|
||||||
(*pDRIPriv->pDriverInfo->wrap.WakeupHandler) (pScreen,
|
(*pDRIPriv->pDriverInfo->wrap.WakeupHandler) (pScreen, result);
|
||||||
result, pReadmask);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1691,14 +1690,12 @@ DRIBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask)
|
||||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.BlockHandler)
|
if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.BlockHandler)
|
||||||
(*pDRIPriv->pDriverInfo->wrap.BlockHandler) (pScreen,
|
(*pDRIPriv->pDriverInfo->wrap.BlockHandler) (pScreen, pTimeout);
|
||||||
pTimeout, pReadmask);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DRIDoWakeupHandler(ScreenPtr pScreen,
|
DRIDoWakeupHandler(ScreenPtr pScreen, int result)
|
||||||
unsigned long result, void *pReadmask)
|
|
||||||
{
|
{
|
||||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
|
@ -1715,8 +1712,7 @@ DRIDoWakeupHandler(ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DRIDoBlockHandler(ScreenPtr pScreen,
|
DRIDoBlockHandler(ScreenPtr pScreen, void *timeout)
|
||||||
void *pTimeout, void *pReadmask)
|
|
||||||
{
|
{
|
||||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
|
|
|
@ -269,12 +269,9 @@ extern _X_EXPORT void DRIWakeupHandler(void *wakeupData,
|
||||||
extern _X_EXPORT void DRIBlockHandler(void *blockData,
|
extern _X_EXPORT void DRIBlockHandler(void *blockData,
|
||||||
OSTimePtr pTimeout, void *pReadmask);
|
OSTimePtr pTimeout, void *pReadmask);
|
||||||
|
|
||||||
extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen,
|
extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen, int result);
|
||||||
unsigned long result,
|
|
||||||
void *pReadmask);
|
|
||||||
|
|
||||||
extern _X_EXPORT void DRIDoBlockHandler(ScreenPtr pScreen,
|
extern _X_EXPORT void DRIDoBlockHandler(ScreenPtr pScreen, void *timeout);
|
||||||
void *pTimeout, void *pReadmask);
|
|
||||||
|
|
||||||
extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx);
|
extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx);
|
||||||
|
|
||||||
|
|
|
@ -639,12 +639,12 @@ ms_dirty_get_ent(ScreenPtr screen, PixmapPtr slave_dst)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
msBlockHandler(ScreenPtr pScreen, void *pTimeout, void *pReadmask)
|
msBlockHandler(ScreenPtr pScreen, void *timeout)
|
||||||
{
|
{
|
||||||
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
|
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
|
||||||
|
|
||||||
pScreen->BlockHandler = ms->BlockHandler;
|
pScreen->BlockHandler = ms->BlockHandler;
|
||||||
pScreen->BlockHandler(pScreen, pTimeout, pReadmask);
|
pScreen->BlockHandler(pScreen, timeout);
|
||||||
ms->BlockHandler = pScreen->BlockHandler;
|
ms->BlockHandler = pScreen->BlockHandler;
|
||||||
pScreen->BlockHandler = msBlockHandler;
|
pScreen->BlockHandler = msBlockHandler;
|
||||||
if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode)
|
if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode)
|
||||||
|
@ -656,12 +656,12 @@ msBlockHandler(ScreenPtr pScreen, void *pTimeout, void *pReadmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
msBlockHandler_oneshot(ScreenPtr pScreen, void *pTimeout, void *pReadmask)
|
msBlockHandler_oneshot(ScreenPtr pScreen, void *pTimeout)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
|
|
||||||
msBlockHandler(pScreen, pTimeout, pReadmask);
|
msBlockHandler(pScreen, pTimeout);
|
||||||
|
|
||||||
drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE);
|
drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,8 +221,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xf86RotateBlockHandler(ScreenPtr pScreen,
|
xf86RotateBlockHandler(ScreenPtr pScreen, void *pTimeout)
|
||||||
void *pTimeout, void *pReadmask)
|
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
@ -235,7 +234,7 @@ xf86RotateBlockHandler(ScreenPtr pScreen,
|
||||||
|
|
||||||
xf86RotateRedisplay(pScreen);
|
xf86RotateRedisplay(pScreen);
|
||||||
|
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, pTimeout);
|
||||||
|
|
||||||
/* Re-wrap if we still need this hook */
|
/* Re-wrap if we still need this hook */
|
||||||
if (xf86_config->rotation_damage != NULL) {
|
if (xf86_config->rotation_damage != NULL) {
|
||||||
|
|
|
@ -48,9 +48,7 @@
|
||||||
* Clean out any autoreleased objects.
|
* Clean out any autoreleased objects.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
QuartzBlockHandler(void *blockData,
|
QuartzBlockHandler(void *blockData, void *pTimeout)
|
||||||
OSTimePtr pTimeout,
|
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
static NSAutoreleasePool *aPool = nil;
|
static NSAutoreleasePool *aPool = nil;
|
||||||
|
|
||||||
|
@ -62,9 +60,7 @@ QuartzBlockHandler(void *blockData,
|
||||||
* QuartzWakeupHandler
|
* QuartzWakeupHandler
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
QuartzWakeupHandler(void *blockData,
|
QuartzWakeupHandler(void *blockData, int result)
|
||||||
int result,
|
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
// nothing here
|
// nothing here
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,9 @@ extern int aquaMenuBarHeight;
|
||||||
extern const char *quartzOpenGLBundle;
|
extern const char *quartzOpenGLBundle;
|
||||||
|
|
||||||
void
|
void
|
||||||
QuartzBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask);
|
QuartzBlockHandler(void *blockData, void *pTimeout);
|
||||||
|
|
||||||
void
|
void
|
||||||
QuartzWakeupHandler(void *blockData, int result, void *pReadmask);
|
QuartzWakeupHandler(void *blockData, int result);
|
||||||
|
|
||||||
#endif /* _QUARTZCOMMON_H */
|
#endif /* _QUARTZCOMMON_H */
|
||||||
|
|
|
@ -902,9 +902,7 @@ Bool
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
winWakeupHandler(ScreenPtr pScreen, int iResult);
|
||||||
winWakeupHandler(ScreenPtr pScreen,
|
|
||||||
unsigned long ulResult, void *pReadmask);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* winwindow.c
|
* winwindow.c
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
|
|
||||||
/* See Porting Layer Definition - p. 7 */
|
/* See Porting Layer Definition - p. 7 */
|
||||||
void
|
void
|
||||||
winWakeupHandler(ScreenPtr pScreen,
|
winWakeupHandler(ScreenPtr pScreen, int iResult)
|
||||||
unsigned long ulResult, void *pReadmask)
|
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
|
|
|
@ -258,12 +258,15 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
|
||||||
typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
|
typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
|
||||||
|
|
||||||
typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen,
|
typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen,
|
||||||
void *pTimeout,
|
void *timeout);
|
||||||
void *pReadmask);
|
|
||||||
|
|
||||||
|
/* result has three possible values:
|
||||||
|
* < 0 - error
|
||||||
|
* = 0 - timeout
|
||||||
|
* > 0 - activity
|
||||||
|
*/
|
||||||
typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr pScreen,
|
typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr pScreen,
|
||||||
unsigned long result,
|
int result);
|
||||||
void *pReadMask);
|
|
||||||
|
|
||||||
typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ );
|
typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ );
|
||||||
|
|
||||||
|
|
|
@ -198,8 +198,7 @@ static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y,
|
||||||
unsigned int subWindowMode);
|
unsigned int subWindowMode);
|
||||||
static void miSpriteCopyWindow(WindowPtr pWindow,
|
static void miSpriteCopyWindow(WindowPtr pWindow,
|
||||||
DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||||
static void miSpriteBlockHandler(ScreenPtr pScreen,
|
static void miSpriteBlockHandler(ScreenPtr pScreen, void *timeout);
|
||||||
void *pTimeout, void *pReadMask);
|
|
||||||
static void miSpriteInstallColormap(ColormapPtr pMap);
|
static void miSpriteInstallColormap(ColormapPtr pMap);
|
||||||
static void miSpriteStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef);
|
static void miSpriteStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef);
|
||||||
|
|
||||||
|
@ -512,8 +511,7 @@ miSpriteCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miSpriteBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
miSpriteBlockHandler(ScreenPtr pScreen, void *timeout)
|
||||||
void *pReadmask)
|
|
||||||
{
|
{
|
||||||
miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen);
|
miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen);
|
||||||
DeviceIntPtr pDev;
|
DeviceIntPtr pDev;
|
||||||
|
@ -545,7 +543,7 @@ miSpriteBlockHandler(ScreenPtr pScreen, void *pTimeout,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, timeout);
|
||||||
|
|
||||||
if (WorkToDo)
|
if (WorkToDo)
|
||||||
SCREEN_EPILOGUE(pPriv, pScreen, BlockHandler);
|
SCREEN_EPILOGUE(pPriv, pScreen, BlockHandler);
|
||||||
|
|
|
@ -65,14 +65,14 @@ shadowRedisplay(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
shadowBlockHandler(ScreenPtr pScreen, void *timeout, void *pRead)
|
shadowBlockHandler(ScreenPtr pScreen, void *timeout)
|
||||||
{
|
{
|
||||||
shadowBuf(pScreen);
|
shadowBuf(pScreen);
|
||||||
|
|
||||||
shadowRedisplay(pScreen);
|
shadowRedisplay(pScreen);
|
||||||
|
|
||||||
unwrap(pBuf, pScreen, BlockHandler);
|
unwrap(pBuf, pScreen, BlockHandler);
|
||||||
pScreen->BlockHandler(pScreen, timeout, pRead);
|
pScreen->BlockHandler(pScreen, timeout);
|
||||||
wrap(pBuf, pScreen, BlockHandler);
|
wrap(pBuf, pScreen, BlockHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue