From 8f0cd571657751c8f64b9c5d91722c1297d8c798 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 12 Sep 2014 00:32:51 +0100 Subject: vivante: fix Composite repeat handling We should change the Picture's repeat setting across a Composite operation. Ensure that this is restored after we've done processing the operation. Signed-off-by: Russell King --- src/vivante.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/vivante.c b/src/vivante.c index 8823896..255d27f 100644 --- a/src/vivante.c +++ b/src/vivante.c @@ -555,12 +555,27 @@ vivante_Composite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, CARD16 width, CARD16 height) { struct vivante *vivante = vivante_get_screen_priv(pDst->pDrawable->pScreen); + Bool ret; - if (vivante->force_fallback || - !vivante_accel_Composite(op, pSrc, pMask, pDst, xSrc, ySrc, - xMask, yMask, xDst, yDst, width, height)) - vivante_unaccel_Composite(op, pSrc, pMask, pDst, xSrc, ySrc, - xMask, yMask, xDst, yDst, width, height); + if (!vivante->force_fallback) { + unsigned src_repeat, mask_repeat; + + src_repeat = pSrc->repeat; + if (pMask) + mask_repeat = pMask->repeat; + + ret = vivante_accel_Composite(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + pSrc->repeat = src_repeat; + if (pMask) + pMask->repeat = mask_repeat; + + if (ret) + return; + } + vivante_unaccel_Composite(op, pSrc, pMask, pDst, xSrc, ySrc, + xMask, yMask, xDst, yDst, width, height); } #endif -- cgit v1.2.3