winex11.drv: Correctly handle overlapping source and destination regions on the same DIB when copying DIBs client-side.
This commit is contained in:
parent
28ca9a8658
commit
28ddfe802e
|
@ -1623,9 +1623,18 @@ static BOOL X11DRV_ClientSideDIBCopy( X11DRV_PDEVICE *physDevSrc, INT xSrc, INT
|
||||||
dstRowOffset = -dstDib.dsBm.bmWidthBytes;
|
dstRowOffset = -dstDib.dsBm.bmWidthBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle overlapping regions on the same DIB */
|
||||||
|
if (physDevSrc == physDevDst && ySrc < yDst)
|
||||||
|
{
|
||||||
|
srcPtr += srcRowOffset * (height - 1);
|
||||||
|
srcRowOffset = -srcRowOffset;
|
||||||
|
dstPtr += dstRowOffset * (height - 1);
|
||||||
|
dstRowOffset = -dstRowOffset;
|
||||||
|
}
|
||||||
|
|
||||||
for (y = yDst; y < yDst + height; ++y)
|
for (y = yDst; y < yDst + height; ++y)
|
||||||
{
|
{
|
||||||
memcpy(dstPtr, srcPtr, bytesToCopy);
|
memmove(dstPtr, srcPtr, bytesToCopy);
|
||||||
srcPtr += srcRowOffset;
|
srcPtr += srcRowOffset;
|
||||||
dstPtr += dstRowOffset;
|
dstPtr += dstRowOffset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue