summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-15 09:44:20 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-15 09:48:08 +0000
commite68a8748f3418179eb41e8d81ba1050b883b7e47 (patch)
treeadd28de43cb297e5dbf66277e7bec716b481d6f4
parente3153a779ed220ad71958ce56be179d458794964 (diff)
uxa: Move the region creation beyond the call into glamor
So that we avoid leaking the region if hooking into glamor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--uxa/uxa-accel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 67712d2d..00948b78 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -714,12 +714,12 @@ uxa_poly_fill_rect(DrawablePtr pDrawable,
uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen);
RegionPtr pClip = fbGetCompositeClip(pGC);
PixmapPtr pPixmap;
- register BoxPtr pbox;
+ RegionPtr pReg;
+ BoxPtr pbox;
int fullX1, fullX2, fullY1, fullY2;
int xoff, yoff;
int xorg, yorg;
int n;
- RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
int ok;
@@ -729,12 +729,13 @@ uxa_poly_fill_rect(DrawablePtr pDrawable,
uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW);
if (!ok)
- goto fallback;
+ uxa_check_poly_fill_rect(pDrawable, pGC, nrect, prect);
return;
}
/* Compute intersection of rects and clip region */
+ pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
REGION_INTERSECT(pScreen, pReg, pClip, pReg);