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).
This commit is contained in:
Kristian Høgsberg 2004-08-12 01:57:51 +00:00
parent 09d0056b8b
commit 47ee5f4ba7

View File

@ -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;