diff options
Diffstat (limited to 'xorg-server/glx/glxdri.c')
-rw-r--r-- | xorg-server/glx/glxdri.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c index bd04fcd13..2119d4879 100644 --- a/xorg-server/glx/glxdri.c +++ b/xorg-server/glx/glxdri.c @@ -820,10 +820,19 @@ static void __glXReportDamage(__DRIdrawable *driDraw, __glXenterServer(GL_FALSE);
- RegionInit(®ion, (BoxPtr) rects, num_rects);
- RegionTranslate(®ion, pDraw->x, pDraw->y);
- DamageDamageRegion(pDraw, ®ion);
- RegionUninit(®ion);
+ if (RegionInitBoxes(®ion, (BoxPtr) rects, num_rects)) {
+ RegionTranslate(®ion, pDraw->x, pDraw->y);
+ DamageDamageRegion(pDraw, ®ion);
+ RegionUninit(®ion);
+ }
+ else {
+ while (num_rects--) {
+ RegionInit (®ion, (BoxPtr) rects++, 1);
+ RegionTranslate(®ion, pDraw->x, pDraw->y);
+ DamageDamageRegion(pDraw, ®ion);
+ RegionUninit(®ion);
+ }
+ }
__glXleaveServer(GL_FALSE);
}
|