From 47ee5f4ba72f0e0bc92a5e04073c70808e85fc08 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Thu, 12 Aug 2004 01:57:51 +0000 Subject: Add call to SourceValidate() when pDst == pSrc, so misprite.c get a chance to remove the sprite before the area is copied. The drivers handle pDst != pSrc (#1030). --- miext/damage/damage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 3d1681dc9..98f42e54c 100755 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -728,6 +728,12 @@ damageCopyArea(DrawablePtr pSrc, RegionPtr ret; DAMAGE_GC_OP_PROLOGUE(pGC, pDst); + /* The driver will only call SourceValidate() when pSrc != pDst, + * but the software sprite (misprite.c) always need to know when a + * drawable is copied so it can remove the sprite. See #1030. */ + if ((pSrc == pDst) && pSrc->pScreen->SourceValidate) + (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height); + if (checkGCDamage (pDst, pGC)) { BoxRec box; @@ -762,6 +768,13 @@ damageCopyPlane(DrawablePtr pSrc, { RegionPtr ret; DAMAGE_GC_OP_PROLOGUE(pGC, pDst); + + /* The driver will only call SourceValidate() when pSrc != pDst, + * but the software sprite (misprite.c) always need to know when a + * drawable is copied so it can remove the sprite. See #1030. */ + if ((pSrc == pDst) && pSrc->pScreen->SourceValidate) + (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height); + if (checkGCDamage (pDst, pGC)) { BoxRec box; -- cgit v1.2.3