diff options
Diffstat (limited to 'glx')
-rw-r--r-- | glx/glxdri.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/glx/glxdri.c b/glx/glxdri.c index c87ac9a65..244eac6c2 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -817,10 +817,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); } |