mi: Deobfuscate miOverlayWindowExposures
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
fb34f27348
commit
7b35dc9b15
|
@ -983,28 +983,19 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||||
{
|
{
|
||||||
RegionPtr exposures = prgn;
|
RegionPtr exposures = prgn;
|
||||||
|
|
||||||
if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) {
|
if (prgn && !RegionNil(prgn)) {
|
||||||
RegionRec expRec;
|
RegionRec expRec;
|
||||||
int clientInterested;
|
int clientInterested =
|
||||||
|
(pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
|
||||||
clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
|
if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
|
||||||
ExposureMask;
|
|
||||||
if (clientInterested && exposures &&
|
|
||||||
(RegionNumRects(exposures) > RECTLIMIT)) {
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
box = *RegionExtents(exposures);
|
box = *RegionExtents(prgn);
|
||||||
if (exposures == prgn) {
|
exposures = &expRec;
|
||||||
exposures = &expRec;
|
RegionInit(exposures, &box, 1);
|
||||||
RegionInit(exposures, &box, 1);
|
RegionReset(prgn, &box);
|
||||||
RegionReset(prgn, &box);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
RegionReset(exposures, &box);
|
|
||||||
RegionUnion(prgn, prgn, exposures);
|
|
||||||
}
|
|
||||||
/* This is the only reason why we are replacing mi's version
|
/* This is the only reason why we are replacing mi's version
|
||||||
of this file */
|
of this file */
|
||||||
|
|
||||||
|
@ -1016,21 +1007,14 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||||
else
|
else
|
||||||
RegionIntersect(prgn, prgn, &pWin->clipList);
|
RegionIntersect(prgn, prgn, &pWin->clipList);
|
||||||
}
|
}
|
||||||
if (prgn && !RegionNil(prgn))
|
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||||
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
if (clientInterested)
|
||||||
if (clientInterested && exposures && !RegionNil(exposures))
|
|
||||||
miSendExposures(pWin, exposures,
|
miSendExposures(pWin, exposures,
|
||||||
pWin->drawable.x, pWin->drawable.y);
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
if (exposures == &expRec) {
|
if (exposures == &expRec)
|
||||||
RegionUninit(exposures);
|
RegionUninit(exposures);
|
||||||
}
|
RegionEmpty(prgn);
|
||||||
else if (exposures && exposures != prgn)
|
|
||||||
RegionDestroy(exposures);
|
|
||||||
if (prgn)
|
|
||||||
RegionEmpty(prgn);
|
|
||||||
}
|
}
|
||||||
else if (exposures && exposures != prgn)
|
|
||||||
RegionDestroy(exposures);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue