aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winshadgdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winshadgdi.c')
-rw-r--r--xorg-server/hw/xwin/winshadgdi.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c
index 2e5714bf0..6bfe41179 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -424,7 +424,7 @@ winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf)
DWORD dwBox = RegionNumRects(damage);
BoxPtr pBox = RegionRects(damage);
int x, y, w, h;
- HRGN hrgnTemp = NULL, hrgnCombined = NULL;
+ HRGN hrgnCombined = NULL;
#ifdef XWIN_UPDATESTATS
static DWORD s_dwNonUnitRegions = 0;
@@ -486,16 +486,11 @@ winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf)
}
}
else if (!pScreenInfo->fMultiWindow) {
+
/* Compute a GDI region from the damaged region */
- hrgnCombined = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2);
- dwBox--;
- pBox++;
- while (dwBox--) {
- hrgnTemp = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2);
- CombineRgn(hrgnCombined, hrgnCombined, hrgnTemp, RGN_OR);
- DeleteObject(hrgnTemp);
- pBox++;
- }
+ hrgnCombined =
+ CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2,
+ pBoxExtents->y2);
/* Install the GDI region as a clipping region */
SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined);