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 cdbb46bf2..912f7e41f 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -439,7 +439,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;
@@ -500,16 +500,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);