2012-03-15 19:11:12 +00:00
|
|
|
|
|
|
|
#include "DibLib.h"
|
|
|
|
|
2012-03-22 20:12:50 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
Dib_BitBlt_SRCCOPY_EqSurf(PBLTDATA pBltData)
|
|
|
|
{
|
2012-03-24 16:19:48 +00:00
|
|
|
ULONG cLines, cjWidth;
|
2012-03-22 20:12:50 +00:00
|
|
|
PBYTE pjDestBase = pBltData->siDst.pjBase;
|
|
|
|
PBYTE pjSrcBase = pBltData->siSrc.pjBase;
|
|
|
|
|
2012-03-24 16:19:48 +00:00
|
|
|
/* Calculate the width in bytes */
|
|
|
|
cjWidth = pBltData->ulWidth * pBltData->siDst.jBpp / 8;
|
|
|
|
|
2012-03-22 20:12:50 +00:00
|
|
|
/* Loop all lines */
|
|
|
|
cLines = pBltData->ulHeight;
|
|
|
|
while (cLines--)
|
|
|
|
{
|
|
|
|
memcpy(pjDestBase, pjSrcBase, cjWidth);
|
2012-03-24 16:19:48 +00:00
|
|
|
pjDestBase += pBltData->siDst.cjAdvanceY;
|
|
|
|
pjSrcBase += pBltData->siSrc.cjAdvanceY;
|
2012-03-22 20:12:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#define Dib_BitBlt_SRCCOPY_S8_D8_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
|
|
|
|
#define Dib_BitBlt_SRCCOPY_S16_D16_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
|
|
|
|
#define Dib_BitBlt_SRCCOPY_S24_D24_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
|
|
|
|
|
|
|
|
/* special movsd optimization on x86 */
|
|
|
|
#if defined(_M_IX86) || defined(_M_AMD64)
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
Dib_BitBlt_SRCCOPY_S32_D32_EqSurf(PBLTDATA pBltData)
|
|
|
|
{
|
|
|
|
ULONG cLines, cRows = pBltData->ulWidth;
|
|
|
|
PBYTE pjDestBase = pBltData->siDst.pjBase;
|
|
|
|
PBYTE pjSrcBase = pBltData->siSrc.pjBase;
|
|
|
|
|
|
|
|
/* Loop all lines */
|
|
|
|
cLines = pBltData->ulHeight;
|
|
|
|
while (cLines--)
|
|
|
|
{
|
|
|
|
__movsd((PULONG)pjDestBase, (PULONG)pjSrcBase, cRows);
|
2012-03-24 16:19:48 +00:00
|
|
|
pjDestBase += pBltData->siDst.cjAdvanceY;
|
|
|
|
pjSrcBase += pBltData->siSrc.cjAdvanceY;
|
2012-03-22 20:12:50 +00:00
|
|
|
}
|
|
|
|
}
|
2012-07-22 00:15:02 +00:00
|
|
|
#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurf_manual 1
|
2012-03-22 20:12:50 +00:00
|
|
|
#else
|
|
|
|
#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
|
|
|
|
#endif
|
|
|
|
|
2012-07-22 20:24:10 +00:00
|
|
|
/* This definition will be checked against in DibLib_BitBlt.h
|
|
|
|
for all "redirected" functions */
|
2012-07-22 00:15:02 +00:00
|
|
|
#define Dib_BitBlt_SRCCOPY_EqSurf_manual 1
|
2012-03-22 20:12:50 +00:00
|
|
|
|
2012-03-15 19:11:12 +00:00
|
|
|
#define __USES_SOURCE 1
|
|
|
|
#define __USES_PATTERN 0
|
|
|
|
#define __USES_DEST 0
|
|
|
|
#define __USES_MASK 0
|
|
|
|
|
|
|
|
#define __FUNCTIONNAME BitBlt_SRCCOPY
|
|
|
|
|
|
|
|
#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCCOPY(D,S,P)
|
|
|
|
|
2012-07-22 20:24:10 +00:00
|
|
|
#include "DibLib_AllSrcBPP.h"
|
2012-03-15 19:11:12 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
Dib_BitBlt_SRCCOPY(PBLTDATA pBltData)
|
|
|
|
{
|
|
|
|
gapfnBitBlt_SRCCOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
|
|
|
}
|
|
|
|
|