mi: Move pScreen->SendGraphicsExpose up to dix
No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
5d3bd8a3dc
commit
1e56b2dfc6
|
@ -1193,8 +1193,7 @@ PanoramiXCopyArea(ClientPtr client)
|
|||
Bool overlap;
|
||||
|
||||
RegionValidate(&totalReg, &overlap);
|
||||
(*pDst->pScreen->SendGraphicsExpose) (client, &totalReg,
|
||||
stuff->dstDrawable,
|
||||
SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
|
||||
X_CopyArea, 0);
|
||||
RegionUninit(&totalReg);
|
||||
}
|
||||
|
@ -1306,8 +1305,7 @@ PanoramiXCopyPlane(ClientPtr client)
|
|||
Bool overlap;
|
||||
|
||||
RegionValidate(&totalReg, &overlap);
|
||||
(*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg,
|
||||
stuff->dstDrawable,
|
||||
SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
|
||||
X_CopyPlane, 0);
|
||||
RegionUninit(&totalReg);
|
||||
}
|
||||
|
|
|
@ -1597,6 +1597,52 @@ ProcClearToBackground(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/* send GraphicsExpose events, or a NoExpose event, based on the region */
|
||||
void
|
||||
SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
|
||||
int major, int minor)
|
||||
{
|
||||
if (pRgn && !RegionNil(pRgn)) {
|
||||
xEvent *pEvent;
|
||||
xEvent *pe;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int numRects;
|
||||
|
||||
numRects = RegionNumRects(pRgn);
|
||||
pBox = RegionRects(pRgn);
|
||||
if (!(pEvent = calloc(numRects, sizeof(xEvent))))
|
||||
return;
|
||||
pe = pEvent;
|
||||
|
||||
for (i = 1; i <= numRects; i++, pe++, pBox++) {
|
||||
pe->u.u.type = GraphicsExpose;
|
||||
pe->u.graphicsExposure.drawable = drawable;
|
||||
pe->u.graphicsExposure.x = pBox->x1;
|
||||
pe->u.graphicsExposure.y = pBox->y1;
|
||||
pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
|
||||
pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
|
||||
pe->u.graphicsExposure.count = numRects - i;
|
||||
pe->u.graphicsExposure.majorEvent = major;
|
||||
pe->u.graphicsExposure.minorEvent = minor;
|
||||
}
|
||||
/* GraphicsExpose is a "critical event", which TryClientEvents
|
||||
* handles specially. */
|
||||
TryClientEvents(client, NULL, pEvent, numRects,
|
||||
(Mask) 0, NoEventMask, NullGrab);
|
||||
free(pEvent);
|
||||
}
|
||||
else {
|
||||
xEvent event = {
|
||||
.u.noExposure.drawable = drawable,
|
||||
.u.noExposure.majorEvent = major,
|
||||
.u.noExposure.minorEvent = minor
|
||||
};
|
||||
event.u.u.type = NoExpose;
|
||||
WriteEventsToClient(client, 1, &event);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ProcCopyArea(ClientPtr client)
|
||||
{
|
||||
|
@ -1628,8 +1674,7 @@ ProcCopyArea(ClientPtr client)
|
|||
stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY);
|
||||
if (pGC->graphicsExposures) {
|
||||
(*pDst->pScreen->SendGraphicsExpose)
|
||||
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
|
||||
SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
|
||||
if (pRgn)
|
||||
RegionDestroy(pRgn);
|
||||
}
|
||||
|
@ -1676,8 +1721,7 @@ ProcCopyPlane(ClientPtr client)
|
|||
stuff->srcY, stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY, stuff->bitPlane);
|
||||
if (pGC->graphicsExposures) {
|
||||
(*pdstDraw->pScreen->SendGraphicsExpose)
|
||||
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
|
||||
SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
|
||||
if (pRgn)
|
||||
RegionDestroy(pRgn);
|
||||
}
|
||||
|
|
|
@ -254,6 +254,12 @@ extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
|
|||
|
||||
extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
|
||||
|
||||
extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */);
|
||||
|
||||
/* atom.c */
|
||||
|
||||
extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
|
||||
|
|
|
@ -252,12 +252,6 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
|
|||
|
||||
typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
|
||||
|
||||
typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */ );
|
||||
|
||||
typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen,
|
||||
void *pTimeout,
|
||||
void *pReadmask);
|
||||
|
@ -540,7 +534,6 @@ typedef struct _Screen {
|
|||
/* Region procedures */
|
||||
|
||||
BitmapToRegionProcPtr BitmapToRegion;
|
||||
SendGraphicsExposeProcPtr SendGraphicsExpose;
|
||||
|
||||
/* os layer procedures */
|
||||
|
||||
|
|
7
mi/mi.h
7
mi/mi.h
|
@ -232,13 +232,6 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ ,
|
|||
int /*dsty */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
int /*dx */ ,
|
||||
|
|
|
@ -306,53 +306,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
|||
}
|
||||
}
|
||||
|
||||
/* send GraphicsExpose events, or a NoExpose event, based on the region */
|
||||
|
||||
void
|
||||
miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
|
||||
int major, int minor)
|
||||
{
|
||||
if (pRgn && !RegionNil(pRgn)) {
|
||||
xEvent *pEvent;
|
||||
xEvent *pe;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int numRects;
|
||||
|
||||
numRects = RegionNumRects(pRgn);
|
||||
pBox = RegionRects(pRgn);
|
||||
if (!(pEvent = calloc(numRects, sizeof(xEvent))))
|
||||
return;
|
||||
pe = pEvent;
|
||||
|
||||
for (i = 1; i <= numRects; i++, pe++, pBox++) {
|
||||
pe->u.u.type = GraphicsExpose;
|
||||
pe->u.graphicsExposure.drawable = drawable;
|
||||
pe->u.graphicsExposure.x = pBox->x1;
|
||||
pe->u.graphicsExposure.y = pBox->y1;
|
||||
pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
|
||||
pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
|
||||
pe->u.graphicsExposure.count = numRects - i;
|
||||
pe->u.graphicsExposure.majorEvent = major;
|
||||
pe->u.graphicsExposure.minorEvent = minor;
|
||||
}
|
||||
/* GraphicsExpose is a "critical event", which TryClientEvents
|
||||
* handles specially. */
|
||||
TryClientEvents(client, NULL, pEvent, numRects,
|
||||
(Mask) 0, NoEventMask, NullGrab);
|
||||
free(pEvent);
|
||||
}
|
||||
else {
|
||||
xEvent event = {
|
||||
.u.noExposure.drawable = drawable,
|
||||
.u.noExposure.majorEvent = major,
|
||||
.u.noExposure.minorEvent = minor
|
||||
};
|
||||
event.u.u.type = NoExpose;
|
||||
WriteEventsToClient(client, 1, &event);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
|
||||
{
|
||||
|
|
|
@ -259,7 +259,6 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
|
|||
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
|
||||
/* ListInstalledColormaps, StoreColors, ResolveColor */
|
||||
/* BitmapToRegion */
|
||||
pScreen->SendGraphicsExpose = miSendGraphicsExpose;
|
||||
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA;
|
||||
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA;
|
||||
pScreen->MarkWindow = miMarkWindow;
|
||||
|
|
Loading…
Reference in New Issue
Block a user