mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
panoramiX: XineramaGetImageData(): scope scratchMem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
1193e294e7
commit
be425a933c
@@ -1138,9 +1138,7 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
||||
{
|
||||
RegionRec SrcRegion, GrabRegion;
|
||||
BoxRec SrcBox;
|
||||
int size = 0;
|
||||
DrawablePtr pDraw = pDrawables[0];
|
||||
char *ScratchMem = NULL;
|
||||
|
||||
/* find box in logical screen space */
|
||||
SrcBox.x1 = left;
|
||||
@@ -1192,6 +1190,9 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
||||
if (nbox) {
|
||||
BoxRec *pbox = RegionRects(&GrabRegion);
|
||||
|
||||
int size = 0;
|
||||
char *ScratchMem = NULL;
|
||||
|
||||
while (nbox--) {
|
||||
int w = pbox->x2 - pbox->x1;
|
||||
int h = pbox->y2 - pbox->y1;
|
||||
@@ -1275,15 +1276,13 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
||||
pbox++;
|
||||
}
|
||||
|
||||
free(ScratchMem);
|
||||
RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
|
||||
if (!RegionNotEmpty(&SrcRegion))
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
free(ScratchMem);
|
||||
|
||||
RegionUninit(&SrcRegion);
|
||||
RegionUninit(&GrabRegion);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user