summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-09-12 00:32:51 +0100
committerRussell King <rmk@arm.linux.org.uk>2014-09-12 01:10:38 +0100
commit8f0cd571657751c8f64b9c5d91722c1297d8c798 (patch)
tree5e72aa6847cab5084a21545bafdc1decb30a5721
parent6b1d1cfbcd6aa3396f11366ad60d54824e4a09ab (diff)
downloadxf86-video-armada-8f0cd571657751c8f64b9c5d91722c1297d8c798.tar.gz
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 <rmk@arm.linux.org.uk>
-rw-r--r--src/vivante.c25
1 files 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