ReactOS 0.4.16-dev-297-gc569aee
BitBlt_SRCCOPY.c
Go to the documentation of this file.
1
2#include "DibLib.h"
3
7{
8 ULONG cLines, cjWidth;
9 PBYTE pjDestBase = pBltData->siDst.pjBase;
10 PBYTE pjSrcBase = pBltData->siSrc.pjBase;
11
12 /* Calculate the width in bytes */
13 cjWidth = pBltData->ulWidth * pBltData->siDst.jBpp / 8;
14
15 /* Loop all lines */
16 cLines = pBltData->ulHeight;
17 while (cLines--)
18 {
19 memcpy(pjDestBase, pjSrcBase, cjWidth);
20 pjDestBase += pBltData->siDst.cjAdvanceY;
21 pjSrcBase += pBltData->siSrc.cjAdvanceY;
22 }
23}
24
25#define Dib_BitBlt_SRCCOPY_S8_D8_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
26#define Dib_BitBlt_SRCCOPY_S16_D16_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
27#define Dib_BitBlt_SRCCOPY_S24_D24_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
28
29/* special movsd optimization on x86 */
30#if defined(_M_IX86) || defined(_M_AMD64)
31VOID
34{
35 ULONG cLines, cRows = pBltData->ulWidth;
36 PBYTE pjDestBase = pBltData->siDst.pjBase;
37 PBYTE pjSrcBase = pBltData->siSrc.pjBase;
38
39 /* Loop all lines */
40 cLines = pBltData->ulHeight;
41 while (cLines--)
42 {
43 __movsd((PULONG)pjDestBase, (PULONG)pjSrcBase, cRows);
44 pjDestBase += pBltData->siDst.cjAdvanceY;
45 pjSrcBase += pBltData->siSrc.cjAdvanceY;
46 }
47}
48#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurf_manual 1
49#else
50#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurf Dib_BitBlt_SRCCOPY_EqSurf
51#endif
52
53/* This definition will be checked against in DibLib_BitBlt.h
54 for all "redirected" functions */
55#define Dib_BitBlt_SRCCOPY_EqSurf_manual 1
56
57#define __USES_SOURCE 1
58#define __USES_PATTERN 0
59#define __USES_DEST 0
60#define __USES_MASK 0
61
62#define __FUNCTIONNAME BitBlt_SRCCOPY
63
64#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCCOPY(D,S,P)
65
66#include "DibLib_AllSrcBPP.h"
67
68VOID
71{
72 gapfnBitBlt_SRCCOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
73}
74
VOID FASTCALL Dib_BitBlt_SRCCOPY_EqSurf(PBLTDATA pBltData)
Definition: BitBlt_SRCCOPY.c:6
VOID FASTCALL Dib_BitBlt_SRCCOPY(PBLTDATA pBltData)
#define Dib_BitBlt_SRCCOPY_S32_D32_EqSurf
PFN_DIBFUNCTION gapfnBitBlt_SRCCOPY[7][7]
PPC_QUAL void __movsd(unsigned long *Destination, const unsigned long *Source, unsigned long Count)
Definition: intrin_ppc.h:333
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FASTCALL
Definition: nt_native.h:50
BYTE * PBYTE
Definition: pedump.c:66
SURFINFO siSrc
ULONG ulWidth
SURFINFO siDst
ULONG ulHeight
PBYTE pjBase
ULONG iFormat
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59