mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
[WIN32K]
Add new dibcode, currently as a static library. Not used, not built. svn path=/trunk/; revision=56157
This commit is contained in:
parent
70c79f936b
commit
252df91f2c
37 changed files with 3630 additions and 0 deletions
27
reactos/subsystems/win32/win32k/diblib/BitBlt.c
Normal file
27
reactos/subsystems/win32/win32k/diblib/BitBlt.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[0](D,S,P)
|
||||
|
||||
#define __FUNCTIONNAME BitBlt
|
||||
#include "DibLib_AllSrcBPP.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME BitBlt_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "DibLib_AllSrcBPP.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnBitBlt[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
||||
|
20
reactos/subsystems/win32/win32k/diblib/BitBlt_DSTINVERT.c
Normal file
20
reactos/subsystems/win32/win32k/diblib/BitBlt_DSTINVERT.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_DSTINVERT(D,S,P)
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_DSTINVERT
|
||||
#include "DibLib_AllDstBPP.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_DSTINVERT(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnBitBlt_DSTINVERT[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
|
35
reactos/subsystems/win32/win32k/diblib/BitBlt_MERGECOPY.c
Normal file
35
reactos/subsystems/win32/win32k/diblib/BitBlt_MERGECOPY.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_MERGECOPY(D,S,P)
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_MERGECOPY
|
||||
#include "DibLib_AllSrcBPP.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME BitBlt_MERGECOPY_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "DibLib_AllSrcBPP.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_MERGECOPY(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnBitBlt_MERGECOPY_Solid[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnBitBlt_MERGECOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_MERGEPAINT.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_MERGEPAINT.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_MERGEPAINT
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_MERGEPAINT(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_MERGEPAINT(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_MERGEPAINT[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
36
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTPATCOPY.c
Normal file
36
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTPATCOPY.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_NOTPATCOPY
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) (~(P))
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
extern PFN_DIBFUNCTION gapfnBitBlt_PATCOPY_Solid[];
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_NOTPATCOPY(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Prepare inverted colot */
|
||||
pBltData->ulSolidColor = ~pBltData->ulSolidColor;
|
||||
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnBitBlt_PATCOPY_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnBitBlt_NOTPATCOPY[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTSRCCOPY.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTSRCCOPY.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_NOTSRCCOPY
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_NOTSRCCOPY(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_NOTSRCCOPY(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_NOTSRCCOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTSRCERASE.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_NOTSRCERASE.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_NOTSRCERASE
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_NOTSRCERASE(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_NOTSRCERASE(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_NOTSRCERASE[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATCOPY.c
Normal file
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATCOPY.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_PATCOPY
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_PATCOPY(D,S,P)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME BitBlt_PATCOPY_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_PATCOPY(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnBitBlt_PATCOPY_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnBitBlt_PATCOPY[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATINVERT.c
Normal file
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATINVERT.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_PATINVERT
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_PATINVERT(D,S,P)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME BitBlt_PATINVERT_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_PATINVERT(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnBitBlt_PATINVERT_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnBitBlt_PATINVERT[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATPAINT.c
Normal file
36
reactos/subsystems/win32/win32k/diblib/BitBlt_PATPAINT.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_PATPAINT
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_PATPAINT(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME BitBlt_PATPAINT_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_PATPAINT(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnBitBlt_PATPAINT_Solid[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnBitBlt_PATPAINT[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCAND.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCAND.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_SRCAND
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCAND(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_SRCAND(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_SRCAND[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCCOPY.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCCOPY.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#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)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_SRCCOPY(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_SRCCOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCERASE.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCERASE.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_SRCERASE
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCERASE(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_SRCERASE(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_SRCERASE[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCINVERT.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCINVERT.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_SRCINVERT
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCINVERT(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_SRCINVERT(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_SRCINVERT[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCPAINT.c
Normal file
22
reactos/subsystems/win32/win32k/diblib/BitBlt_SRCPAINT.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME BitBlt_SRCPAINT
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) ROP_SRCPAINT(D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_SRCPAINT(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnBitBlt_SRCPAINT[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
29
reactos/subsystems/win32/win32k/diblib/BitBlt_other.c
Normal file
29
reactos/subsystems/win32/win32k/diblib/BitBlt_other.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
extern PFN_DIBFUNCTION gapfnBitBlt_PATCOPY_Solid[];
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_BLACKNESS(PBLTDATA pBltData)
|
||||
{
|
||||
/* Pass it to the colorfil function */
|
||||
pBltData->ulSolidColor = XLATEOBJ_iXlate(pBltData->pxlo, 0);
|
||||
gapfnBitBlt_PATCOPY_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_WHITENESS(PBLTDATA pBltData)
|
||||
{
|
||||
/* Pass it to the colorfil function */
|
||||
pBltData->ulSolidColor = XLATEOBJ_iXlate(pBltData->pxlo, 0xFFFFFF);
|
||||
gapfnBitBlt_PATCOPY_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_BitBlt_NOOP(PBLTDATA pBltData)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(pBltData);
|
||||
}
|
36
reactos/subsystems/win32/win32k/diblib/CMakeLists.txt
Normal file
36
reactos/subsystems/win32/win32k/diblib/CMakeLists.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
|
||||
list(APPEND DIBLIB_SOURCE
|
||||
BitBlt.c
|
||||
BitBlt_DSTINVERT.c
|
||||
BitBlt_MERGECOPY.c
|
||||
BitBlt_MERGEPAINT.c
|
||||
BitBlt_NOTPATCOPY.c
|
||||
BitBlt_NOTSRCCOPY.c
|
||||
BitBlt_NOTSRCERASE.c
|
||||
BitBlt_other.c
|
||||
BitBlt_PATCOPY.c
|
||||
BitBlt_PATINVERT.c
|
||||
BitBlt_PATPAINT.c
|
||||
BitBlt_SRCAND.c
|
||||
BitBlt_SRCCOPY.c
|
||||
BitBlt_SRCERASE.c
|
||||
BitBlt_SRCINVERT.c
|
||||
BitBlt_SRCPAINT.c
|
||||
DibLib.c
|
||||
MaskBlt.c
|
||||
MaskCopy.c
|
||||
MaskPaint.c
|
||||
MaskPatBlt.c
|
||||
MaskPatPaint.c
|
||||
MaskSrcBlt.c
|
||||
MaskSrcPaint.c
|
||||
MaskSrcPatBlt.c
|
||||
PatPaint.c
|
||||
RopFunctions.c
|
||||
SrcPaint.c
|
||||
SrcPatBlt.c
|
||||
)
|
||||
|
||||
add_library(diblib ${DIBLIB_SOURCE})
|
||||
|
316
reactos/subsystems/win32/win32k/diblib/DibLib.c
Normal file
316
reactos/subsystems/win32/win32k/diblib/DibLib.c
Normal file
|
@ -0,0 +1,316 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
enum
|
||||
{
|
||||
INDEX_BitBlt_NOOP,
|
||||
INDEX_BitBlt_DSTINVERT,
|
||||
INDEX_BitBlt_BLACKNESS,
|
||||
INDEX_BitBlt_WHITENESS,
|
||||
INDEX_BitBlt_PATCOPY,
|
||||
INDEX_BitBlt_NOTPATCOPY,
|
||||
INDEX_BitBlt_SRCCOPY,
|
||||
INDEX_BitBlt_NOTSRCCOPY,
|
||||
INDEX_BitBlt_SRCERASE,
|
||||
INDEX_BitBlt_NOTSRCERASE,
|
||||
INDEX_BitBlt_PATINVERT,
|
||||
INDEX_BitBlt_SRCINVERT,
|
||||
INDEX_BitBlt_SRCAND,
|
||||
INDEX_BitBlt_MERGEPAINT,
|
||||
INDEX_BitBlt_MERGECOPY,
|
||||
INDEX_BitBlt_SRCPAINT,
|
||||
INDEX_BitBlt_PATPAINT,
|
||||
INDEX_SrcPatBlt,
|
||||
INDEX_PatPaint,
|
||||
INDEX_SrcPaint,
|
||||
INDEX_BitBlt,
|
||||
};
|
||||
|
||||
|
||||
PFN_DIBFUNCTION
|
||||
apfnDibFunction[] =
|
||||
{
|
||||
Dib_BitBlt_NOOP,
|
||||
Dib_BitBlt_DSTINVERT,
|
||||
Dib_BitBlt_BLACKNESS,
|
||||
Dib_BitBlt_WHITENESS,
|
||||
Dib_BitBlt_PATCOPY,
|
||||
Dib_BitBlt_NOTPATCOPY,
|
||||
Dib_BitBlt_SRCCOPY,
|
||||
Dib_BitBlt_NOTSRCCOPY,
|
||||
Dib_BitBlt_SRCERASE,
|
||||
Dib_BitBlt_NOTSRCERASE,
|
||||
Dib_BitBlt_PATINVERT,
|
||||
Dib_BitBlt_SRCINVERT,
|
||||
Dib_BitBlt_SRCAND,
|
||||
Dib_BitBlt_MERGEPAINT,
|
||||
Dib_BitBlt_MERGECOPY,
|
||||
Dib_BitBlt_SRCPAINT,
|
||||
Dib_BitBlt_PATPAINT,
|
||||
Dib_SrcPatBlt,
|
||||
Dib_PatPaint,
|
||||
Dib_SrcPaint,
|
||||
Dib_BitBlt,
|
||||
};
|
||||
|
||||
UCHAR
|
||||
aiIndexPerRop[256] =
|
||||
{
|
||||
INDEX_BitBlt_BLACKNESS, // BLACKNESS
|
||||
INDEX_BitBlt, // DPSoon,
|
||||
INDEX_BitBlt, // DPSona,
|
||||
INDEX_SrcPatBlt, // PSon,
|
||||
INDEX_BitBlt, // SDPona,
|
||||
INDEX_PatPaint, // DPon,
|
||||
INDEX_BitBlt, // PDSxnon,
|
||||
INDEX_BitBlt, // PDSaon,
|
||||
INDEX_BitBlt, // SDPnaa,
|
||||
INDEX_BitBlt, // PDSxon,
|
||||
INDEX_PatPaint, // DPna,
|
||||
INDEX_BitBlt, // PSDnaon,
|
||||
INDEX_SrcPatBlt, // SPna,
|
||||
INDEX_BitBlt, // PDSnaon,
|
||||
INDEX_BitBlt, // PDSonon,
|
||||
INDEX_BitBlt_NOTPATCOPY, // Pn,
|
||||
INDEX_BitBlt, // PDSona,
|
||||
INDEX_BitBlt_NOTSRCERASE, // DSon / NOTSRCERASE
|
||||
INDEX_BitBlt, // SDPxnon,
|
||||
INDEX_BitBlt, // SDPaon,
|
||||
INDEX_BitBlt, // DPSxnon,
|
||||
INDEX_BitBlt, // DPSaon,
|
||||
INDEX_BitBlt, // PSDPSanaxx,
|
||||
INDEX_BitBlt, // SSPxDSxaxn,
|
||||
INDEX_BitBlt, // SPxPDxa,
|
||||
INDEX_BitBlt, // SDPSanaxn,
|
||||
INDEX_BitBlt, // PDSPaox,
|
||||
INDEX_BitBlt, // SDPSxaxn,
|
||||
INDEX_BitBlt, // PSDPaox,
|
||||
INDEX_BitBlt, // DSPDxaxn,
|
||||
INDEX_BitBlt, // PDSox,
|
||||
INDEX_BitBlt, // PDSoan,
|
||||
INDEX_BitBlt, // DPSnaa,
|
||||
INDEX_BitBlt, // SDPxon,
|
||||
INDEX_SrcPaint, // DSna,
|
||||
INDEX_BitBlt, // SPDnaon,
|
||||
INDEX_BitBlt, // SPxDSxa,
|
||||
INDEX_BitBlt, // PDSPanaxn,
|
||||
INDEX_BitBlt, // SDPSaox,
|
||||
INDEX_BitBlt, // SDPSxnox,
|
||||
INDEX_BitBlt, // DPSxa,
|
||||
INDEX_BitBlt, // PSDPSaoxxn,
|
||||
INDEX_BitBlt, // DPSana,
|
||||
INDEX_BitBlt, // SSPxPDxaxn,
|
||||
INDEX_BitBlt, // SPDSoax,
|
||||
INDEX_BitBlt, // PSDnox,
|
||||
INDEX_BitBlt, // PSDPxox,
|
||||
INDEX_BitBlt, // PSDnoan,
|
||||
INDEX_SrcPatBlt, // PSna,
|
||||
INDEX_BitBlt, // SDPnaon,
|
||||
INDEX_BitBlt, // SDPSoox,
|
||||
INDEX_BitBlt_NOTSRCCOPY, // Sn / NOTSRCCOPY
|
||||
INDEX_BitBlt, // SPDSaox,
|
||||
INDEX_BitBlt, // SPDSxnox,
|
||||
INDEX_BitBlt, // SDPox,
|
||||
INDEX_BitBlt, // SDPoan,
|
||||
INDEX_BitBlt, // PSDPoax,
|
||||
INDEX_BitBlt, // SPDnox,
|
||||
INDEX_BitBlt, // SPDSxox,
|
||||
INDEX_BitBlt, // SPDnoan,
|
||||
INDEX_SrcPatBlt, // PSx,
|
||||
INDEX_BitBlt, // SPDSonox,
|
||||
INDEX_BitBlt, // SPDSnaox,
|
||||
INDEX_SrcPatBlt, // PSan,
|
||||
INDEX_BitBlt, // PSDnaa,
|
||||
INDEX_BitBlt, // DPSxon,
|
||||
INDEX_BitBlt, // SDxPDxa,
|
||||
INDEX_BitBlt, // SPDSanaxn,
|
||||
INDEX_BitBlt_SRCERASE, // SDna / SRCERASE
|
||||
INDEX_BitBlt, // DPSnaon,
|
||||
INDEX_BitBlt, // DSPDaox,
|
||||
INDEX_BitBlt, // PSDPxaxn,
|
||||
INDEX_BitBlt, // SDPxa,
|
||||
INDEX_BitBlt, // PDSPDaoxxn,
|
||||
INDEX_BitBlt, // DPSDoax,
|
||||
INDEX_BitBlt, // PDSnox,
|
||||
INDEX_BitBlt, // SDPana,
|
||||
INDEX_BitBlt, // SSPxDSxoxn,
|
||||
INDEX_BitBlt, // PDSPxox,
|
||||
INDEX_BitBlt, // PDSnoan,
|
||||
INDEX_PatPaint, // PDna,
|
||||
INDEX_BitBlt, // DSPnaon,
|
||||
INDEX_BitBlt, // DPSDaox,
|
||||
INDEX_BitBlt, // SPDSxaxn,
|
||||
INDEX_BitBlt, // DPSonon,
|
||||
INDEX_BitBlt_DSTINVERT, // Dn / DSTINVERT
|
||||
INDEX_BitBlt, // DPSox,
|
||||
INDEX_BitBlt, // DPSoan,
|
||||
INDEX_BitBlt, // PDSPoax,
|
||||
INDEX_BitBlt, // DPSnox,
|
||||
INDEX_BitBlt_PATINVERT, // DPx / PATINVERT
|
||||
INDEX_BitBlt, // DPSDonox,
|
||||
INDEX_BitBlt, // DPSDxox,
|
||||
INDEX_BitBlt, // DPSnoan,
|
||||
INDEX_BitBlt, // DPSDnaox,
|
||||
INDEX_PatPaint, // DPan,
|
||||
INDEX_BitBlt, // PDSxa,
|
||||
INDEX_BitBlt, // DSPDSaoxxn,
|
||||
INDEX_BitBlt, // DSPDoax,
|
||||
INDEX_BitBlt, // SDPnox,
|
||||
INDEX_BitBlt, // SDPSoax,
|
||||
INDEX_BitBlt, // DSPnox,
|
||||
INDEX_BitBlt_SRCINVERT, // DSx / SRCINVERT
|
||||
INDEX_BitBlt, // SDPSonox,
|
||||
INDEX_BitBlt, // DSPDSonoxxn,
|
||||
INDEX_BitBlt, // PDSxxn,
|
||||
INDEX_BitBlt, // DPSax,
|
||||
INDEX_BitBlt, // PSDPSoaxxn,
|
||||
INDEX_BitBlt, // SDPax,
|
||||
INDEX_BitBlt, // PDSPDoaxxn,
|
||||
INDEX_BitBlt, // SDPSnoax,
|
||||
INDEX_BitBlt, // PDSxnan,
|
||||
INDEX_BitBlt, // PDSana,
|
||||
INDEX_BitBlt, // SSDxPDxaxn,
|
||||
INDEX_BitBlt, // SDPSxox,
|
||||
INDEX_BitBlt, // SDPnoan,
|
||||
INDEX_BitBlt, // DSPDxox,
|
||||
INDEX_BitBlt, // DSPnoan,
|
||||
INDEX_BitBlt, // SDPSnaox,
|
||||
INDEX_SrcPaint, // DSan,
|
||||
INDEX_BitBlt, // PDSax,
|
||||
INDEX_BitBlt, // DSPDSoaxxn,
|
||||
INDEX_BitBlt, // DPSDnoax,
|
||||
INDEX_BitBlt, // SDPxnan,
|
||||
INDEX_BitBlt, // SPDSnoax,
|
||||
INDEX_BitBlt, // DPSxnan,
|
||||
INDEX_BitBlt, // SPxDSxo,
|
||||
INDEX_BitBlt, // DPSaan,
|
||||
INDEX_BitBlt, // DPSaa,
|
||||
INDEX_BitBlt, // SPxDSxon,
|
||||
INDEX_BitBlt, // DPSxna,
|
||||
INDEX_BitBlt, // SPDSnoaxn,
|
||||
INDEX_BitBlt, // SDPxna,
|
||||
INDEX_BitBlt, // PDSPnoaxn,
|
||||
INDEX_BitBlt, // DSPDSoaxx,
|
||||
INDEX_BitBlt, // PDSaxn,
|
||||
INDEX_BitBlt_SRCAND, // DSa / SRCAND
|
||||
INDEX_BitBlt, // SDPSnaoxn,
|
||||
INDEX_BitBlt, // DSPnoa,
|
||||
INDEX_BitBlt, // DSPDxoxn,
|
||||
INDEX_BitBlt, // SDPnoa,
|
||||
INDEX_BitBlt, // SDPSxoxn,
|
||||
INDEX_BitBlt, // SSDxPDxax,
|
||||
INDEX_BitBlt, // PDSanan,
|
||||
INDEX_BitBlt, // PDSxna,
|
||||
INDEX_BitBlt, // SDPSnoaxn,
|
||||
INDEX_BitBlt, // DPSDPoaxx,
|
||||
INDEX_BitBlt, // SPDaxn,
|
||||
INDEX_BitBlt, // PSDPSoaxx,
|
||||
INDEX_BitBlt, // DPSaxn,
|
||||
INDEX_BitBlt, // DPSxx,
|
||||
INDEX_BitBlt, // PSDPSonoxx,
|
||||
INDEX_BitBlt, // SDPSonoxn,
|
||||
INDEX_SrcPaint, // DSxn,
|
||||
INDEX_BitBlt, // DPSnax,
|
||||
INDEX_BitBlt, // SDPSoaxn,
|
||||
INDEX_BitBlt, // SPDnax,
|
||||
INDEX_BitBlt, // DSPDoaxn,
|
||||
INDEX_BitBlt, // DSPDSaoxx,
|
||||
INDEX_BitBlt, // PDSxan,
|
||||
INDEX_PatPaint, // DPa,
|
||||
INDEX_BitBlt, // PDSPnaoxn,
|
||||
INDEX_BitBlt, // DPSnoa,
|
||||
INDEX_BitBlt, // DPSDxoxn,
|
||||
INDEX_BitBlt, // PDSPonoxn,
|
||||
INDEX_PatPaint, // PDxn,
|
||||
INDEX_BitBlt, // DSPnax,
|
||||
INDEX_BitBlt, // PDSPoaxn,
|
||||
INDEX_BitBlt, // DPSoa,
|
||||
INDEX_BitBlt, // DPSoxn,
|
||||
INDEX_BitBlt_NOOP, // D,
|
||||
INDEX_BitBlt, // DPSono,
|
||||
INDEX_BitBlt, // SPDSxax,
|
||||
INDEX_BitBlt, // DPSDaoxn,
|
||||
INDEX_BitBlt, // DSPnao,
|
||||
INDEX_PatPaint, // DPno,
|
||||
INDEX_BitBlt, // PDSnoa,
|
||||
INDEX_BitBlt, // PDSPxoxn,
|
||||
INDEX_BitBlt, // SSPxDSxox,
|
||||
INDEX_BitBlt, // SDPanan,
|
||||
INDEX_BitBlt, // PSDnax,
|
||||
INDEX_BitBlt, // DPSDoaxn,
|
||||
INDEX_BitBlt, // DPSDPaoxx,
|
||||
INDEX_BitBlt, // SDPxan,
|
||||
INDEX_BitBlt, // PSDPxax,
|
||||
INDEX_BitBlt, // DSPDaoxn,
|
||||
INDEX_BitBlt, // DPSnao,
|
||||
INDEX_BitBlt_MERGEPAINT, // DSno / MERGEPAINT
|
||||
INDEX_BitBlt, // SPDSanax,
|
||||
INDEX_BitBlt, // SDxPDxan,
|
||||
INDEX_BitBlt, // DPSxo,
|
||||
INDEX_BitBlt, // DPSano,
|
||||
INDEX_BitBlt_MERGECOPY, // PSa / MERGECOPY
|
||||
INDEX_BitBlt, // SPDSnaoxn,
|
||||
INDEX_BitBlt, // SPDSonoxn,
|
||||
INDEX_SrcPatBlt, // PSxn,
|
||||
INDEX_BitBlt, // SPDnoa,
|
||||
INDEX_BitBlt, // SPDSxoxn,
|
||||
INDEX_BitBlt, // SDPnax,
|
||||
INDEX_BitBlt, // PSDPoaxn,
|
||||
INDEX_BitBlt, // SDPoa,
|
||||
INDEX_BitBlt, // SPDoxn,
|
||||
INDEX_BitBlt, // DPSDxax,
|
||||
INDEX_BitBlt, // SPDSaoxn,
|
||||
INDEX_BitBlt_SRCCOPY, // S / SRCCOPY
|
||||
INDEX_BitBlt, // SDPono,
|
||||
INDEX_BitBlt, // SDPnao,
|
||||
INDEX_SrcPatBlt, // SPno,
|
||||
INDEX_BitBlt, // PSDnoa,
|
||||
INDEX_BitBlt, // PSDPxoxn,
|
||||
INDEX_BitBlt, // PDSnax,
|
||||
INDEX_BitBlt, // SPDSoaxn,
|
||||
INDEX_BitBlt, // SSPxPDxax,
|
||||
INDEX_BitBlt, // DPSanan,
|
||||
INDEX_BitBlt, // PSDPSaoxx,
|
||||
INDEX_BitBlt, // DPSxan,
|
||||
INDEX_BitBlt, // PDSPxax,
|
||||
INDEX_BitBlt, // SDPSaoxn,
|
||||
INDEX_BitBlt, // DPSDanax,
|
||||
INDEX_BitBlt, // SPxDSxan,
|
||||
INDEX_BitBlt, // SPDnao,
|
||||
INDEX_SrcPaint, // SDno,
|
||||
INDEX_BitBlt, // SDPxo,
|
||||
INDEX_BitBlt, // SDPano,
|
||||
INDEX_BitBlt, // PDSoa,
|
||||
INDEX_BitBlt, // PDSoxn,
|
||||
INDEX_BitBlt, // DSPDxax,
|
||||
INDEX_BitBlt, // PSDPaoxn,
|
||||
INDEX_BitBlt, // SDPSxax,
|
||||
INDEX_BitBlt, // PDSPaoxn,
|
||||
INDEX_BitBlt, // SDPSanax,
|
||||
INDEX_BitBlt, // SPxPDxan,
|
||||
INDEX_BitBlt, // SSPxDSxax,
|
||||
INDEX_BitBlt, // DSPDSanaxxn,
|
||||
INDEX_BitBlt, // DPSao,
|
||||
INDEX_BitBlt, // DPSxno,
|
||||
INDEX_BitBlt, // SDPao,
|
||||
INDEX_BitBlt, // SDPxno,
|
||||
INDEX_BitBlt_SRCPAINT, // DSo / SRCPAINT
|
||||
INDEX_BitBlt, // SDPnoo,
|
||||
INDEX_BitBlt_PATCOPY, // P / PATCOPY
|
||||
INDEX_BitBlt, // PDSono,
|
||||
INDEX_BitBlt, // PDSnao,
|
||||
INDEX_SrcPatBlt, // PSno,
|
||||
INDEX_BitBlt, // PSDnao,
|
||||
INDEX_PatPaint, // PDno,
|
||||
INDEX_BitBlt, // PDSxo,
|
||||
INDEX_BitBlt, // PDSano,
|
||||
INDEX_BitBlt, // PDSao,
|
||||
INDEX_BitBlt, // PDSxno,
|
||||
INDEX_PatPaint, // DPo,
|
||||
INDEX_BitBlt_PATPAINT, // DPSnoo, // PATPAINT
|
||||
INDEX_SrcPatBlt, // PSo,
|
||||
INDEX_BitBlt, // PSDnoo,
|
||||
INDEX_BitBlt, // DPSoo,
|
||||
INDEX_BitBlt_WHITENESS //WHITENESS
|
||||
};
|
||||
|
66
reactos/subsystems/win32/win32k/diblib/DibLib.h
Normal file
66
reactos/subsystems/win32/win32k/diblib/DibLib.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4711)
|
||||
#endif
|
||||
|
||||
#define FASTCALL __fastcall
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <wingdi.h>
|
||||
#include <winddi.h>
|
||||
#include "DibLib_interface.h"
|
||||
|
||||
#define _DibXlate(pBltData, ulColor) (pBltData->pfnXlate(pBltData->pxlo, ulColor))
|
||||
|
||||
#define __PASTE_(s1,s2) s1##s2
|
||||
#define __PASTE(s1,s2) __PASTE_(s1,s2)
|
||||
|
||||
#define __DIB_FUNCTION_NAME_SRCDSTEQ2(name, src_bpp, dst_bpp) Dib_ ## name ## _S ## src_bpp ## _D ## dst_bpp ## _EqSurf
|
||||
#define __DIB_FUNCTION_NAME_SRCDSTEQ(name, src_bpp, dst_bpp) __DIB_FUNCTION_NAME_SRCDSTEQ2(name, src_bpp, dst_bpp)
|
||||
|
||||
#define __DIB_FUNCTION_NAME_SRCDSTEQR2L2(name, src_bpp, dst_bpp) Dib_ ## name ## _S ## src_bpp ## _D ## dst_bpp ## _EqSurfR2L
|
||||
#define __DIB_FUNCTION_NAME_SRCDSTEQR2L(name, src_bpp, dst_bpp) __DIB_FUNCTION_NAME_SRCDSTEQR2L2(name, src_bpp, dst_bpp)
|
||||
|
||||
#define __DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp) Dib_ ## name ## _S ## src_bpp ## _D ## dst_bpp
|
||||
#define __DIB_FUNCTION_NAME_SRCDST(name, src_bpp, dst_bpp) __DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp)
|
||||
|
||||
#define __DIB_FUNCTION_NAME_DST2(name, dst_bpp) Dib_ ## name ## _D ## dst_bpp
|
||||
#define __DIB_FUNCTION_NAME_DST(name, src_bpp, dst_bpp) __DIB_FUNCTION_NAME_DST2(name, dst_bpp)
|
||||
|
||||
#define _ReadPixel_1(pjSource, jShift) (((*(pjSource)) >> (jShift)) & 1)
|
||||
#define _WritePixel_1(pjDest, jShift, ulColor) (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(1<<(jShift))) | ((ulColor)<<(jShift))))
|
||||
#define _NextPixel_1(ppj, pjShift) (void)((*(pjShift))--, *(pjShift) &= 7, (*(ppj) += (*(pjShift) >> 5)))
|
||||
#define _NextPixelR2L_1(ppj, pjShift) (void)((*(ppj) -= (*(pjShift) >> 5)), (*(pjShift))++, *(pjShift) &= 7)
|
||||
#define _SHIFT_1(x) x
|
||||
|
||||
#define _ReadPixel_4(pjSource, jShift) (((*(pjSource)) >> (jShift)) & 15)
|
||||
#define _WritePixel_4(pjDest, jShift, ulColor) (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(15<<(jShift))) | ((ulColor)<<(jShift))))
|
||||
#define _NextPixel_4(ppj, pjShift) (void)((*(ppj) += (*(pjShift) & 1)), (*(pjShift)) -= 4, *(pjShift) &= 7)
|
||||
#define _NextPixelR2L_4(ppj, pjShift) (void)((*(pjShift)) -= 4, *(pjShift) &= 7, (*(ppj) -= (*(pjShift) & 1)))
|
||||
#define _SHIFT_4(x) x
|
||||
|
||||
#define _ReadPixel_8(pjSource, x) (*(UCHAR*)(pjSource))
|
||||
#define _WritePixel_8(pjDest, x, ulColor) (void)(*(UCHAR*)(pjDest) = (UCHAR)(ulColor))
|
||||
#define _NextPixel_8(ppj, pjShift) (void)(*(ppj) += 1)
|
||||
#define _NextPixelR2L_8(ppj, pjShift) (void)(*(ppj) -= 1)
|
||||
#define _SHIFT_8(x)
|
||||
|
||||
#define _ReadPixel_16(pjSource, x) (*(USHORT*)(pjSource))
|
||||
#define _WritePixel_16(pjDest, x, ulColor) (void)(*(USHORT*)(pjDest) = (USHORT)(ulColor))
|
||||
#define _NextPixel_16(ppj, pjShift) (void)(*(ppj) -= 2)
|
||||
#define _NextPixelR2L_16(ppj, pjShift) (void)(*(ppj) += 2)
|
||||
#define _SHIFT_16(x)
|
||||
|
||||
#define _ReadPixel_24(pjSource, x) ((pjSource)[0] | ((pjSource)[1] << 8) | ((pjSource)[2] << 16))
|
||||
#define _WritePixel_24(pjDest, x, ulColor) (void)(((pjDest)[0] = ((ulColor)&0xFF)),((pjDest)[1] = (((ulColor)>>8)&0xFF)),((pjDest)[2] = (((ulColor)>>16)&0xFF)))
|
||||
#define _NextPixel_24(ppj, pjShift) (void)(*(ppj) -= 3)
|
||||
#define _NextPixelR2L_24(ppj, pjShift) (void)(*(ppj) += 3)
|
||||
#define _SHIFT_24(x)
|
||||
|
||||
#define _ReadPixel_32(pjSource, x) (*(ULONG*)(pjSource))
|
||||
#define _WritePixel_32(pjDest, x, ulColor) (void)(*(ULONG*)(pjDest) = (ulColor))
|
||||
#define _NextPixel_32(ppj, pjShift) (void)(*(ppj) += 4)
|
||||
#define _NextPixelR2L_32(ppj, pjShift) (void)(*(ppj) -= 4)
|
||||
#define _SHIFT_32(x)
|
||||
|
46
reactos/subsystems/win32/win32k/diblib/DibLib_AllDstBPP.h
Normal file
46
reactos/subsystems/win32/win32k/diblib/DibLib_AllDstBPP.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
|
||||
#ifndef __DIB_FUNCTION_NAME
|
||||
#define __DIB_FUNCTION_NAME __DIB_FUNCTION_NAME_DST
|
||||
#endif
|
||||
|
||||
#ifndef _SOURCE_BPP
|
||||
#define _SOURCE_BPP 0
|
||||
#endif
|
||||
|
||||
#define _DEST_BPP 1
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#define _DEST_BPP 4
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#define _DEST_BPP 8
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#define _DEST_BPP 16
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#define _DEST_BPP 24
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#define _DEST_BPP 32
|
||||
#include "diblib_bitblt.h"
|
||||
#undef _DEST_BPP
|
||||
|
||||
#if (__USES_SOURCE == 0)
|
||||
PFN_DIBFUNCTION
|
||||
__PASTE(gapfn, __FUNCTIONNAME)[7] =
|
||||
{
|
||||
0,
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 1),
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 4),
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 8),
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 16),
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 24),
|
||||
__DIB_FUNCTION_NAME_DST(__FUNCTIONNAME, 0, 32)
|
||||
};
|
||||
#endif
|
105
reactos/subsystems/win32/win32k/diblib/DibLib_AllSrcBPP.h
Normal file
105
reactos/subsystems/win32/win32k/diblib/DibLib_AllSrcBPP.h
Normal file
|
@ -0,0 +1,105 @@
|
|||
|
||||
#ifndef __DIB_FUNCTION_NAME
|
||||
#define __DIB_FUNCTION_NAME __DIB_FUNCTION_NAME_SRCDST
|
||||
#endif
|
||||
|
||||
#define _SOURCE_BPP 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#define _SOURCE_BPP 4
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#define _SOURCE_BPP 8
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#define _SOURCE_BPP 16
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#define _SOURCE_BPP 24
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#define _SOURCE_BPP 32
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
#undef _DibXlate
|
||||
#define _DibXlate(pBltData, ulColor) (ulColor)
|
||||
#define _SOURCE_BPP _DEST_BPP
|
||||
#define _NextPixel_ _NextPixelR2L_
|
||||
|
||||
#undef __DIB_FUNCTION_NAME
|
||||
#define __DIB_FUNCTION_NAME __DIB_FUNCTION_NAME_SRCDSTEQ
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __DIB_FUNCTION_NAME
|
||||
#define __DIB_FUNCTION_NAME __DIB_FUNCTION_NAME_SRCDSTEQR2L
|
||||
#include "diblib_alldstbpp.h"
|
||||
#undef _SOURCE_BPP
|
||||
|
||||
PFN_DIBFUNCTION
|
||||
__PASTE(gapfn, __FUNCTIONNAME)[7][7] =
|
||||
{
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 1, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 1),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 1),
|
||||
},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 4, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 4),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 4),
|
||||
},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 8, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 8),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 8),
|
||||
},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 16, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 16),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 16),
|
||||
},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 24, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 24),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 24),
|
||||
},
|
||||
{
|
||||
__DIB_FUNCTION_NAME_SRCDSTEQ(__FUNCTIONNAME, 32, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 1, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 4, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 8, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 16, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 24, 32),
|
||||
__DIB_FUNCTION_NAME_SRCDST(__FUNCTIONNAME, 32, 32),
|
||||
},
|
||||
};
|
||||
|
||||
#undef __DIB_FUNCTION_NAME
|
||||
|
130
reactos/subsystems/win32/win32k/diblib/DibLib_BitBlt.h
Normal file
130
reactos/subsystems/win32/win32k/diblib/DibLib_BitBlt.h
Normal file
|
@ -0,0 +1,130 @@
|
|||
|
||||
#if __USES_SOLID_BRUSH
|
||||
#undef __USES_PATTERN
|
||||
#define __USES_PATTERN 0
|
||||
#endif
|
||||
|
||||
#define _DibFunction __DIB_FUNCTION_NAME(__FUNCTIONNAME, _SOURCE_BPP, _DEST_BPP)
|
||||
#define _ReadPixel(bpp, pj, jShift) __PASTE(_ReadPixel_, bpp)(pj, jShift)
|
||||
#define _WritePixel(pj, jShift, c) __PASTE(_WritePixel_, _DEST_BPP)(pj, jShift, c)
|
||||
#define _NextPixel(bpp, ppj, pjShift) __PASTE(_NextPixel_, bpp)(ppj, pjShift)
|
||||
#define _SHIFT(bpp, x) __PASTE(_SHIFT_, bpp)(x)
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
_DibFunction(PBLTDATA pBltData)
|
||||
{
|
||||
ULONG cRows, cLines, ulDest;
|
||||
PBYTE pjDest, pjDestBase;
|
||||
_SHIFT(_DEST_BPP, BYTE jDstShift;)
|
||||
#if __USES_MASK
|
||||
PBYTE pjMask, pjMaskBase;
|
||||
BYTE jMaskBit, jMskShift;
|
||||
#endif
|
||||
#if __USES_SOURCE
|
||||
PBYTE pjSource, pjSrcBase;
|
||||
ULONG ulSource;
|
||||
_SHIFT(_SOURCE_BPP, BYTE jSrcShift;)
|
||||
#endif
|
||||
#if __USES_PATTERN
|
||||
PBYTE pjPattern, pjPatBase;
|
||||
ULONG ulPattern, cPatRows, cPatLines;
|
||||
_SHIFT(_DEST_BPP, BYTE jPatShift;)
|
||||
#endif
|
||||
#if __USES_SOLID_BRUSH
|
||||
ULONG ulPattern = pBltData->ulSolidColor;
|
||||
#endif
|
||||
|
||||
#if __USES_MASK
|
||||
pjMaskBase = pBltData->siMsk.pjBase;
|
||||
#endif
|
||||
#if __USES_PATTERN
|
||||
pjPatBase = pBltData->siPat.pjBase;
|
||||
pjPatBase += pBltData->siPat.ptOrig.y * pBltData->siPat.lDelta;
|
||||
pjPattern = pjPatBase + pBltData->siPat.ptOrig.x * _DEST_BPP / 8;
|
||||
_SHIFT(_DEST_BPP, jPatShift = pBltData->siPat.jShift0;)
|
||||
cPatLines = pBltData->ulPatHeight - pBltData->siPat.ptOrig.y;
|
||||
cPatRows = pBltData->ulPatWidth - pBltData->siPat.ptOrig.x;
|
||||
#endif
|
||||
pjDestBase = pBltData->siDst.pjBase;
|
||||
#if __USES_SOURCE
|
||||
pjSrcBase = pBltData->siSrc.pjBase;
|
||||
#endif
|
||||
|
||||
/* Loop all lines */
|
||||
cLines = pBltData->ulHeight;
|
||||
while (cLines--)
|
||||
{
|
||||
/* Set current bit pointers and shifts */
|
||||
pjDest = pjDestBase;
|
||||
_SHIFT(_DEST_BPP, jDstShift = pBltData->siDst.jShift0;)
|
||||
#if __USES_SOURCE
|
||||
pjSource = pjSrcBase;
|
||||
_SHIFT(_SOURCE_BPP, jSrcShift = pBltData->siSrc.jShift0;)
|
||||
#endif
|
||||
#if __USES_MASK
|
||||
pjMask = pjMaskBase;
|
||||
jMskShift = pBltData->siMsk.jShift0;
|
||||
#endif
|
||||
|
||||
/* Loop all rows */
|
||||
cRows = pBltData->ulWidth;
|
||||
while (cRows--)
|
||||
{
|
||||
#if __USES_MASK
|
||||
/* Read the mask color and go to the next mask pixel */
|
||||
jMaskBit = _ReadPixel_1(pjMask, jMskShift);
|
||||
_NextPixel_1(&pjMask, &jMskShift);
|
||||
#endif
|
||||
#if __USES_PATTERN
|
||||
/* Read the pattern color and go to the next pattern pixel */
|
||||
ulPattern = _ReadPixel(_DEST_BPP, pjPattern, jPatShift);
|
||||
_NextPixel(_DEST_BPP, &pjPattern, &jPatShift);
|
||||
|
||||
/* Check if this was the last pixel in the pattern */
|
||||
if (--cPatRows == 0)
|
||||
{
|
||||
/* Restart pattern from x = 0 */
|
||||
pjPattern = pjPatBase;
|
||||
_SHIFT(_DEST_BPP, jPatShift = (_DEST_BPP == 1) ? 7 : 4;)
|
||||
cPatRows = pBltData->ulPatWidth;
|
||||
}
|
||||
#endif
|
||||
#if __USES_SOURCE
|
||||
/* Read the pattern color, xlate it and go to the next pixel */
|
||||
ulSource = _ReadPixel(_SOURCE_BPP, pjSource, jSrcShift);
|
||||
ulSource = _DibXlate(pBltData, ulSource);
|
||||
_NextPixel(_SOURCE_BPP, &pjSource, &jSrcShift);
|
||||
#endif
|
||||
#if __USES_DEST
|
||||
ulDest = _ReadPixel(_DEST_BPP, pjDest, jDstShift);
|
||||
#endif
|
||||
/* Apply the ROP operation on the colors */
|
||||
ulDest = _DibDoRop(pBltData, jMaskBit, ulDest, ulSource, ulPattern);
|
||||
|
||||
/* Write the pixel and go to the next dest pixel */
|
||||
_WritePixel(pjDest, jDstShift, ulDest);
|
||||
_NextPixel(_DEST_BPP, &pjDest, &jDstShift);
|
||||
}
|
||||
|
||||
pjDestBase += pBltData->siDst.lDelta;
|
||||
#if __USES_SOURCE
|
||||
pjSrcBase += pBltData->siSrc.lDelta;
|
||||
#endif
|
||||
#if __USES_PATTERN
|
||||
/* Go to the next pattern line */
|
||||
pjPatBase += pBltData->siPat.lDelta;
|
||||
|
||||
/* Check if this was the last line in the pattern */
|
||||
if (--cPatLines == 0)
|
||||
{
|
||||
/* Restart pattern from y = 0 */
|
||||
pjPatBase = pBltData->siPat.pjBase;
|
||||
cPatLines = pBltData->ulPatHeight;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#undef _DibFunction
|
||||
#undef __FUNCTIONNAME2
|
66
reactos/subsystems/win32/win32k/diblib/DibLib_interface.h
Normal file
66
reactos/subsystems/win32/win32k/diblib/DibLib_interface.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
#include "RopFunctions.h"
|
||||
|
||||
typedef
|
||||
ULONG
|
||||
(NTAPI *PFN_XLATE)(XLATEOBJ* pxlo, ULONG ulColor);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG iFormat;
|
||||
PBYTE pjBase;
|
||||
LONG lDelta;
|
||||
POINTL ptOrig;
|
||||
BYTE jShift0;
|
||||
} SURFINFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SURFINFO siSrc;
|
||||
SURFINFO siDst;
|
||||
SURFINFO siPat;
|
||||
SURFINFO siMsk;
|
||||
|
||||
ULONG ulWidth;
|
||||
ULONG ulHeight;
|
||||
ULONG ulPatWidth;
|
||||
ULONG ulPatHeight;
|
||||
XLATEOBJ *pxlo;
|
||||
PFN_XLATE pfnXlate;
|
||||
ULONG rop4;
|
||||
PFN_DOROP apfnDoRop[2];
|
||||
ULONG ulSolidColor;
|
||||
} BLTDATA, *PBLTDATA;
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(FASTCALL
|
||||
*PFN_DIBFUNCTION)(PBLTDATA pBltData);
|
||||
|
||||
VOID FASTCALL Dib_BitBlt_NOOP(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SOLIDFILL(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_BLACKNESS(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_WHITENESS(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_PATCOPY(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_NOTPATCOPY(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_DSTINVERT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SRCCOPY(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_NOTSRCCOPY(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SRCERASE(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_NOTSRCERASE(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_PATINVERT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SRCINVERT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SRCAND(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_MERGEPAINT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_MERGECOPY(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_SRCPAINT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt_PATPAINT(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_SrcPatBlt(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_PatPaint(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_SrcPaint(PBLTDATA pBltData);
|
||||
VOID FASTCALL Dib_BitBlt(PBLTDATA pBltData);
|
||||
|
||||
|
||||
extern PFN_DIBFUNCTION apfnDibFunction[];
|
||||
extern UCHAR aiIndexPerRop[256];
|
||||
|
29
reactos/subsystems/win32/win32k/diblib/MaskBlt.c
Normal file
29
reactos/subsystems/win32/win32k/diblib/MaskBlt.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskBlt
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME MaskBlt_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskBlt(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnMaskBlt[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
35
reactos/subsystems/win32/win32k/diblib/MaskCopy.c
Normal file
35
reactos/subsystems/win32/win32k/diblib/MaskCopy.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
extern PFN_DIBFUNCTION gapfnBitBlt_SRCCOPY[7][7];
|
||||
extern PFN_DIBFUNCTION gapfnBitBlt_SRCINVERT[7][7];
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskCopy(PBLTDATA pBltData)
|
||||
{
|
||||
pBltData->siSrc = pBltData->siMsk;
|
||||
|
||||
/* Create an XLATEOBJ */
|
||||
pBltData->pxlo = 0;// FIXME: use 1bpp -> destbpp
|
||||
|
||||
/* 4 possibilities... */
|
||||
if (pBltData->rop4 == MAKEROP4(BLACKNESS, WHITENESS))
|
||||
{
|
||||
gapfnBitBlt_SRCCOPY[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
else if (pBltData->rop4 == MAKEROP4(WHITENESS, BLACKNESS))
|
||||
{
|
||||
gapfnBitBlt_SRCINVERT[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
else if (pBltData->rop4 == MAKEROP4(BLACKNESS, BLACKNESS))
|
||||
{
|
||||
Dib_BitBlt_BLACKNESS(pBltData);
|
||||
}
|
||||
else // if (pBltData->rop4 == MAKEROP4(WHITENESS, WHITENESS))
|
||||
{
|
||||
Dib_BitBlt_WHITENESS(pBltData);
|
||||
}
|
||||
}
|
||||
|
||||
|
25
reactos/subsystems/win32/win32k/diblib/MaskPaint.c
Normal file
25
reactos/subsystems/win32/win32k/diblib/MaskPaint.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskPaint
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,0,0)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskPaint(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnMaskPaint[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
26
reactos/subsystems/win32/win32k/diblib/MaskPatBlt.c
Normal file
26
reactos/subsystems/win32/win32k/diblib/MaskPatBlt.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskPatBlt
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](0,0,P)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME MaskPatBlt_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskPatBlt(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnMaskPatBlt[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
|
38
reactos/subsystems/win32/win32k/diblib/MaskPatPaint.c
Normal file
38
reactos/subsystems/win32/win32k/diblib/MaskPatPaint.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskPatPaint
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,0,P)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME MaskPatPaint_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskPatPaint(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnMaskPatPaint_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnMaskPatPaint[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
23
reactos/subsystems/win32/win32k/diblib/MaskSrcBlt.c
Normal file
23
reactos/subsystems/win32/win32k/diblib/MaskSrcBlt.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskSrcBlt
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,S,0)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskSrcBlt(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnMaskSrcBlt[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
||||
|
21
reactos/subsystems/win32/win32k/diblib/MaskSrcPaint.c
Normal file
21
reactos/subsystems/win32/win32k/diblib/MaskSrcPaint.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskSrcPaint
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,S,0)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskSrcPaint(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnMaskSrcPaint[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
27
reactos/subsystems/win32/win32k/diblib/MaskSrcPatBlt.c
Normal file
27
reactos/subsystems/win32/win32k/diblib/MaskSrcPatBlt.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 1
|
||||
|
||||
#define __FUNCTIONNAME MaskSrcPatBlt
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[M](D,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME MaskSrcPatBlt_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_MaskSrcPatBlt(PBLTDATA pBltData)
|
||||
{
|
||||
gapfnMaskSrcPatBlt[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
38
reactos/subsystems/win32/win32k/diblib/PatPaint.c
Normal file
38
reactos/subsystems/win32/win32k/diblib/PatPaint.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 0
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME PatPaint
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[0](D,0,P)
|
||||
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME PatPaint_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_alldstbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_PatPaint(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnPatPaint_Solid[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnPatPaint[pBltData->siDst.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
1547
reactos/subsystems/win32/win32k/diblib/RopFunctions.c
Normal file
1547
reactos/subsystems/win32/win32k/diblib/RopFunctions.c
Normal file
File diff suppressed because it is too large
Load diff
282
reactos/subsystems/win32/win32k/diblib/RopFunctions.h
Normal file
282
reactos/subsystems/win32/win32k/diblib/RopFunctions.h
Normal file
|
@ -0,0 +1,282 @@
|
|||
|
||||
typedef
|
||||
ULONG
|
||||
(__fastcall
|
||||
*PFN_DOROP)(ULONG D, ULONG S, ULONG P);
|
||||
|
||||
PFN_DOROP gapfnRop[256];
|
||||
|
||||
#define ROP_0(D,S,P) 0 /* BLACKNESS */
|
||||
#define ROP_DPSoon(D,S,P) (~((D)|((P)|(S))))
|
||||
#define ROP_DPSona(D,S,P) ((D)&(~((P)|(S))))
|
||||
#define ROP_PSon(D,S,P) (~((P)|(S)))
|
||||
#define ROP_SDPona(D,S,P) ((S)&(~((D)|(P))))
|
||||
#define ROP_DPon(D,S,P) (~((D)|(P)))
|
||||
#define ROP_PDSxnon(D,S,P) (~((P)|(~((D)^(S)))))
|
||||
#define ROP_PDSaon(D,S,P) (~((P)|((D)&(S))))
|
||||
#define ROP_SDPnaa(D,S,P) ((S)&((D)&(~(P))))
|
||||
#define ROP_PDSxon(D,S,P) (~((P)|((D)^(S))))
|
||||
#define ROP_DPna(D,S,P) ((D)&(~(P)))
|
||||
#define ROP_PSDnaon(D,S,P) (~((P)|((S)&(~(D)))))
|
||||
#define ROP_SPna(D,S,P) ((S)&(~(P)))
|
||||
#define ROP_PDSnaon(D,S,P) (~((P)|((D)&(~(S)))))
|
||||
#define ROP_PDSonon(D,S,P) (~((P)|(~((D)|(S)))))
|
||||
#define ROP_Pn(D,S,P) (~(P))
|
||||
#define ROP_PDSona(D,S,P) ((P)&(~((D)|(S))))
|
||||
#define ROP_DSon(D,S,P) (~((D)|(S))) /* NOTSRCERASE */
|
||||
#define ROP_SDPxnon(D,S,P) (~((S)|(~((D)^(P)))))
|
||||
#define ROP_SDPaon(D,S,P) (~((S)|((D)&(P))))
|
||||
#define ROP_DPSxnon(D,S,P) (~((D)|(~((P)^(S)))))
|
||||
#define ROP_DPSaon(D,S,P) (~((D)|((P)&(S))))
|
||||
#define ROP_PSDPSanaxx(D,S,P) ((P)^((S)^((D)&(~((P)&(S))))))
|
||||
#define ROP_SSPxDSxaxn(D,S,P) (~((S)^(((S)^(P))&((D)^(S)))))
|
||||
#define ROP_SPxPDxa(D,S,P) (((S)^(P))&((P)^(D)))
|
||||
#define ROP_SDPSanaxn(D,S,P) (~((S)^((D)&(~((P)&(S))))))
|
||||
#define ROP_PDSPaox(D,S,P) ((P)^((D)|((S)&(P))))
|
||||
#define ROP_SDPSxaxn(D,S,P) (~((S)^((D)&((P)^(S)))))
|
||||
#define ROP_PSDPaox(D,S,P) ((P)^((S)|((D)&(P))))
|
||||
#define ROP_DSPDxaxn(D,S,P) (~((D)^((S)&((P)^(D)))))
|
||||
#define ROP_PDSox(D,S,P) ((P)^((D)|(S)))
|
||||
#define ROP_PDSoan(D,S,P) (~((P)&((D)|(S))))
|
||||
#define ROP_DPSnaa(D,S,P) ((D)&((P)&(~(S))))
|
||||
#define ROP_SDPxon(D,S,P) (~((S)|((D)^(P))))
|
||||
#define ROP_DSna(D,S,P) ((D)&(~(S)))
|
||||
#define ROP_SPDnaon(D,S,P) (~((S)|((P)&(~(D)))))
|
||||
#define ROP_SPxDSxa(D,S,P) (((S)^(P))&((D)^(S)))
|
||||
#define ROP_PDSPanaxn(D,S,P) (~((P)^((D)&(~((S)&(P))))))
|
||||
#define ROP_SDPSaox(D,S,P) ((S)^((D)|((P)&(S))))
|
||||
#define ROP_SDPSxnox(D,S,P) ((S)^((D)|(~((P)^(S)))))
|
||||
#define ROP_DPSxa(D,S,P) ((D)&((P)^(S)))
|
||||
#define ROP_PSDPSaoxxn(D,S,P) (~((P)^((S)^((D)|((P)&(S))))))
|
||||
#define ROP_DPSana(D,S,P) ((D)&(~((P)&(S))))
|
||||
#define ROP_SSPxPDxaxn(D,S,P) (~((S)^(((S)^(P))&((P)^(D)))))
|
||||
#define ROP_SPDSoax(D,S,P) ((S)^((P)&((D)|(S))))
|
||||
#define ROP_PSDnox(D,S,P) ((P)^((S)|(~(D))))
|
||||
#define ROP_PSDPxox(D,S,P) ((P)^((S)|((D)^(P))))
|
||||
#define ROP_PSDnoan(D,S,P) (~((P)&((S)|(~(D)))))
|
||||
#define ROP_PSna(D,S,P) ((P)&(~(S)))
|
||||
#define ROP_SDPnaon(D,S,P) (~((S)|((D)&(~(P)))))
|
||||
#define ROP_SDPSoox(D,S,P) ((S)^((D)|((P)|(S))))
|
||||
#define ROP_Sn(D,S,P) (~(S)) /* NOTSRCCOPY */
|
||||
#define ROP_SPDSaox(D,S,P) ((S)^((P)|((D)&(S))))
|
||||
#define ROP_SPDSxnox(D,S,P) ((S)^((P)|(~((D)^(S)))))
|
||||
#define ROP_SDPox(D,S,P) ((S)^((D)|(P)))
|
||||
#define ROP_SDPoan(D,S,P) (~((S)&((D)|(P))))
|
||||
#define ROP_PSDPoax(D,S,P) ((P)^((S)&((D)|(P))))
|
||||
#define ROP_SPDnox(D,S,P) ((S)^((P)|(~(D))))
|
||||
#define ROP_SPDSxox(D,S,P) ((S)^((P)|((D)^(S))))
|
||||
#define ROP_SPDnoan(D,S,P) (~((S)&((P)|(~(D)))))
|
||||
#define ROP_PSx(D,S,P) ((P)^(S))
|
||||
#define ROP_SPDSonox(D,S,P) ((S)^((P)|(~((D)|(S)))))
|
||||
#define ROP_SPDSnaox(D,S,P) ((S)^((P)|((D)&(~(S)))))
|
||||
#define ROP_PSan(D,S,P) (~((P)&(S)))
|
||||
#define ROP_PSDnaa(D,S,P) ((P)&((S)&(~(D))))
|
||||
#define ROP_DPSxon(D,S,P) (~((D)|((P)^(S))))
|
||||
#define ROP_SDxPDxa(D,S,P) (((S)^(D))&((P)^(D)))
|
||||
#define ROP_SPDSanaxn(D,S,P) (~((S)^((P)&(~((D)&(S))))))
|
||||
#define ROP_SDna(D,S,P) ((S)&(~(D))) /* SRCERASE */
|
||||
#define ROP_DPSnaon(D,S,P) (~((D)|((P)&(~(S)))))
|
||||
#define ROP_DSPDaox(D,S,P) ((D)^((S)|((P)&(D))))
|
||||
#define ROP_PSDPxaxn(D,S,P) (~((P)^((S)&((D)^(P)))))
|
||||
#define ROP_SDPxa(D,S,P) ((S)&((D)^(P)))
|
||||
#define ROP_PDSPDaoxxn(D,S,P) (~((P)^((D)^((S)|((P)&(D))))))
|
||||
#define ROP_DPSDoax(D,S,P) ((D)^((P)&((S)|(D))))
|
||||
#define ROP_PDSnox(D,S,P) ((P)^((D)|(~(S))))
|
||||
#define ROP_SDPana(D,S,P) ((S)&(~((D)&(P))))
|
||||
#define ROP_SSPxDSxoxn(D,S,P) (~((S)^(((S)^(P))|((D)^(S)))))
|
||||
#define ROP_PDSPxox(D,S,P) ((P)^((D)|((S)^(P))))
|
||||
#define ROP_PDSnoan(D,S,P) (~((P)&((D)|(~(S)))))
|
||||
#define ROP_PDna(D,S,P) ((P)&(~(D)))
|
||||
#define ROP_DSPnaon(D,S,P) (~((D)|((S)&(~(P)))))
|
||||
#define ROP_DPSDaox(D,S,P) ((D)^((P)|((S)&(D))))
|
||||
#define ROP_SPDSxaxn(D,S,P) (~((S)^((P)&((D)^(S)))))
|
||||
#define ROP_DPSonon(D,S,P) (~((D)|(~((P)|(S)))))
|
||||
#define ROP_Dn(D,S,P) (~(D)) /* DSTINVERT */
|
||||
#define ROP_DPSox(D,S,P) ((D)^((P)|(S)))
|
||||
#define ROP_DPSoan(D,S,P) (~((D)&((P)|(S))))
|
||||
#define ROP_PDSPoax(D,S,P) ((P)^((D)&((S)|(P))))
|
||||
#define ROP_DPSnox(D,S,P) ((D)^((P)|(~(S))))
|
||||
#define ROP_DPx(D,S,P) ((D)^(P)) /* PATINVERT */
|
||||
#define ROP_DPSDonox(D,S,P) ((D)^((P)|(~((S)|(D)))))
|
||||
#define ROP_DPSDxox(D,S,P) ((D)^((P)|((S)^(D))))
|
||||
#define ROP_DPSnoan(D,S,P) (~((D)&((P)|(~(S)))))
|
||||
#define ROP_DPSDnaox(D,S,P) ((D)^((P)|((S)&(~(D)))))
|
||||
#define ROP_DPan(D,S,P) (~((D)&(P)))
|
||||
#define ROP_PDSxa(D,S,P) ((P)&((D)^(S)))
|
||||
#define ROP_DSPDSaoxxn(D,S,P) (~((D)^((S)^((P)|((D)&(S))))))
|
||||
#define ROP_DSPDoax(D,S,P) ((D)^((S)&((P)|(D))))
|
||||
#define ROP_SDPnox(D,S,P) ((S)^((D)|(~(P))))
|
||||
#define ROP_SDPSoax(D,S,P) ((S)^((D)&((P)|(S))))
|
||||
#define ROP_DSPnox(D,S,P) ((D)^((S)|(~(P))))
|
||||
#define ROP_DSx(D,S,P) ((D)^(S)) /* SRCINVERT */
|
||||
#define ROP_SDPSonox(D,S,P) ((S)^((D)|(~((P)|(S)))))
|
||||
#define ROP_DSPDSonoxxn(D,S,P) (~((D)^((S)^((P)|(~((D)|(S)))))))
|
||||
#define ROP_PDSxxn(D,S,P) (~((P)^((D)^(S))))
|
||||
#define ROP_DPSax(D,S,P) ((D)^((P)&(S)))
|
||||
#define ROP_PSDPSoaxxn(D,S,P) (~((P)^((S)^((D)&((P)|(S))))))
|
||||
#define ROP_SDPax(D,S,P) ((S)^((D)&(P)))
|
||||
#define ROP_PDSPDoaxxn(D,S,P) (~((P)^((D)^((S)&((P)|(D))))))
|
||||
#define ROP_SDPSnoax(D,S,P) ((S)^((D)&((P)|(~(S)))))
|
||||
#define ROP_PDSxnan(D,S,P) (~((P)&(~((D)^(S)))))
|
||||
#define ROP_PDSana(D,S,P) ((P)&(~((D)&(S))))
|
||||
#define ROP_SSDxPDxaxn(D,S,P) (~((S)^(((S)^(D))&((P)^(D)))))
|
||||
#define ROP_SDPSxox(D,S,P) ((S)^((D)|((P)^(S))))
|
||||
#define ROP_SDPnoan(D,S,P) (~((S)&((D)|(~(P)))))
|
||||
#define ROP_DSPDxox(D,S,P) ((D)^((S)|((P)^(D))))
|
||||
#define ROP_DSPnoan(D,S,P) (~((D)&((S)|(~(P)))))
|
||||
#define ROP_SDPSnaox(D,S,P) ((S)^((D)|((P)&(~(S)))))
|
||||
#define ROP_DSan(D,S,P) (~((D)&(S)))
|
||||
#define ROP_PDSax(D,S,P) ((P)^((D)&(S)))
|
||||
#define ROP_DSPDSoaxxn(D,S,P) (~((D)^((S)^((P)&((D)|(S))))))
|
||||
#define ROP_DPSDnoax(D,S,P) ((D)^((P)&((S)|(~(D)))))
|
||||
#define ROP_SDPxnan(D,S,P) (~((S)&(~((D)^(P)))))
|
||||
#define ROP_SPDSnoax(D,S,P) ((S)^((P)&((D)|(~(S)))))
|
||||
#define ROP_DPSxnan(D,S,P) (~((D)&(~((P)^(S)))))
|
||||
#define ROP_SPxDSxo(D,S,P) (((S)^(P))|((D)^(S)))
|
||||
#define ROP_DPSaan(D,S,P) (~((D)&((P)&(S))))
|
||||
#define ROP_DPSaa(D,S,P) ((D)&((P)&(S)))
|
||||
#define ROP_SPxDSxon(D,S,P) (~(((S)^(P))|((D)^(S))))
|
||||
#define ROP_DPSxna(D,S,P) ((D)&(~((P)^(S))))
|
||||
#define ROP_SPDSnoaxn(D,S,P) (~((S)^((P)&((D)|(~(S))))))
|
||||
#define ROP_SDPxna(D,S,P) ((S)&(~((D)^(P))))
|
||||
#define ROP_PDSPnoaxn(D,S,P) (~((P)^((D)&((S)|(~(P))))))
|
||||
#define ROP_DSPDSoaxx(D,S,P) ((D)^((S)^((P)&((D)|(S)))))
|
||||
#define ROP_PDSaxn(D,S,P) (~((P)^((D)&(S))))
|
||||
#define ROP_DSa(D,S,P) ((D)&(S)) /* SRCAND */
|
||||
#define ROP_SDPSnaoxn(D,S,P) (~((S)^((D)|((P)&(~(S))))))
|
||||
#define ROP_DSPnoa(D,S,P) ((D)&((S)|(~(P))))
|
||||
#define ROP_DSPDxoxn(D,S,P) (~((D)^((S)|((P)^(D)))))
|
||||
#define ROP_SDPnoa(D,S,P) ((S)&((D)|(~(P))))
|
||||
#define ROP_SDPSxoxn(D,S,P) (~((S)^((D)|((P)^(S)))))
|
||||
#define ROP_SSDxPDxax(D,S,P) ((S)^(((S)^(D))&((P)^(D))))
|
||||
#define ROP_PDSanan(D,S,P) (~((P)&(~((D)&(S)))))
|
||||
#define ROP_PDSxna(D,S,P) ((P)&(~((D)^(S))))
|
||||
#define ROP_SDPSnoaxn(D,S,P) (~((S)^((D)&((P)|(~(S))))))
|
||||
#define ROP_DPSDPoaxx(D,S,P) ((D)^((P)^((S)&((D)|(P)))))
|
||||
#define ROP_SPDaxn(D,S,P) (~((S)^((P)&(D))))
|
||||
#define ROP_PSDPSoaxx(D,S,P) ((P)^((S)^((D)&((P)|(S)))))
|
||||
#define ROP_DPSaxn(D,S,P) (~((D)^((P)&(S))))
|
||||
#define ROP_DPSxx(D,S,P) ((D)^((P)^(S)))
|
||||
#define ROP_PSDPSonoxx(D,S,P) ((P)^((S)^((D)|(~((P)|(S))))))
|
||||
#define ROP_SDPSonoxn(D,S,P) (~((S)^((D)|(~((P)|(S))))))
|
||||
#define ROP_DSxn(D,S,P) (~((D)^(S)))
|
||||
#define ROP_DPSnax(D,S,P) ((D)^((P)&(~(S))))
|
||||
#define ROP_SDPSoaxn(D,S,P) (~((S)^((D)&((P)|(S)))))
|
||||
#define ROP_SPDnax(D,S,P) ((S)^((P)&(~(D))))
|
||||
#define ROP_DSPDoaxn(D,S,P) (~((D)^((S)&((P)|(D)))))
|
||||
#define ROP_DSPDSaoxx(D,S,P) ((D)^((S)^((P)|((D)&(S)))))
|
||||
#define ROP_PDSxan(D,S,P) (~((P)&((D)^(S))))
|
||||
#define ROP_DPa(D,S,P) ((D)&(P))
|
||||
#define ROP_PDSPnaoxn(D,S,P) (~((P)^((D)|((S)&(~(P))))))
|
||||
#define ROP_DPSnoa(D,S,P) ((D)&((P)|(~(S))))
|
||||
#define ROP_DPSDxoxn(D,S,P) (~((D)^((P)|((S)^(D)))))
|
||||
#define ROP_PDSPonoxn(D,S,P) (~((P)^((D)|(~((S)|(P))))))
|
||||
#define ROP_PDxn(D,S,P) (~((P)^(D)))
|
||||
#define ROP_DSPnax(D,S,P) ((D)^((S)&(~(P))))
|
||||
#define ROP_PDSPoaxn(D,S,P) (~((P)^((D)&((S)|(P)))))
|
||||
#define ROP_DPSoa(D,S,P) ((D)&((P)|(S)))
|
||||
#define ROP_DPSoxn(D,S,P) (~((D)^((P)|(S))))
|
||||
#define ROP_D(D,S,P) (D)
|
||||
#define ROP_DPSono(D,S,P) ((D)|(~((P)|(S))))
|
||||
#define ROP_SPDSxax(D,S,P) ((S)^((P)&((D)^(S))))
|
||||
#define ROP_DPSDaoxn(D,S,P) (~((D)^((P)|((S)&(D)))))
|
||||
#define ROP_DSPnao(D,S,P) ((D)|((S)&(~(P))))
|
||||
#define ROP_DPno(D,S,P) ((D)|(~(P)))
|
||||
#define ROP_PDSnoa(D,S,P) ((P)&((D)|(~(S))))
|
||||
#define ROP_PDSPxoxn(D,S,P) (~((P)^((D)|((S)^(P)))))
|
||||
#define ROP_SSPxDSxox(D,S,P) ((S)^(((S)^(P))|((D)^(S))))
|
||||
#define ROP_SDPanan(D,S,P) (~((S)&(~((D)&(P)))))
|
||||
#define ROP_PSDnax(D,S,P) ((P)^((S)&(~(D))))
|
||||
#define ROP_DPSDoaxn(D,S,P) (~((D)^((P)&((S)|(D)))))
|
||||
#define ROP_DPSDPaoxx(D,S,P) ((D)^((P)^((S)|((D)&(P)))))
|
||||
#define ROP_SDPxan(D,S,P) (~((S)&((D)^(P))))
|
||||
#define ROP_PSDPxax(D,S,P) ((P)^((S)&((D)^(P))))
|
||||
#define ROP_DSPDaoxn(D,S,P) (~((D)^((S)|((P)&(D)))))
|
||||
#define ROP_DPSnao(D,S,P) ((D)|((P)&(~(S))))
|
||||
#define ROP_DSno(D,S,P) ((D)|(~(S))) /* MERGEPAINT */
|
||||
#define ROP_SPDSanax(D,S,P) ((S)^((P)&(~((D)&(S)))))
|
||||
#define ROP_SDxPDxan(D,S,P) (~(((S)^(D))&((P)^(D))))
|
||||
#define ROP_DPSxo(D,S,P) ((D)|((P)^(S)))
|
||||
#define ROP_DPSano(D,S,P) ((D)|(~((P)&(S))))
|
||||
#define ROP_PSa(D,S,P) ((P)&(S)) /* MERGECOPY */
|
||||
#define ROP_SPDSnaoxn(D,S,P) (~((S)^((P)|((D)&(~(S))))))
|
||||
#define ROP_SPDSonoxn(D,S,P) (~((S)^((P)|(~((D)|(S))))))
|
||||
#define ROP_PSxn(D,S,P) (~((P)^(S)))
|
||||
#define ROP_SPDnoa(D,S,P) ((S)&((P)|(~(D))))
|
||||
#define ROP_SPDSxoxn(D,S,P) (~((S)^((P)|((D)^(S)))))
|
||||
#define ROP_SDPnax(D,S,P) ((S)^((D)&(~(P))))
|
||||
#define ROP_PSDPoaxn(D,S,P) (~((P)^((S)&((D)|(P)))))
|
||||
#define ROP_SDPoa(D,S,P) ((S)&((D)|(P)))
|
||||
#define ROP_SPDoxn(D,S,P) (~((S)^((P)|(D))))
|
||||
#define ROP_DPSDxax(D,S,P) ((D)^((P)&((S)^(D))))
|
||||
#define ROP_SPDSaoxn(D,S,P) (~((S)^((P)|((D)&(S)))))
|
||||
#define ROP_S(D,S,P) (S) /* SRCCOPY */
|
||||
#define ROP_SDPono(D,S,P) ((S)|(~((D)|(P))))
|
||||
#define ROP_SDPnao(D,S,P) ((S)|((D)&(~(P))))
|
||||
#define ROP_SPno(D,S,P) ((S)|(~(P)))
|
||||
#define ROP_PSDnoa(D,S,P) ((P)&((S)|(~(D))))
|
||||
#define ROP_PSDPxoxn(D,S,P) (~((P)^((S)|((D)^(P)))))
|
||||
#define ROP_PDSnax(D,S,P) ((P)^((D)&(~(S))))
|
||||
#define ROP_SPDSoaxn(D,S,P) (~((S)^((P)&((D)|(S)))))
|
||||
#define ROP_SSPxPDxax(D,S,P) ((S)^(((S)^(P))&((P)^(D))))
|
||||
#define ROP_DPSanan(D,S,P) (~((D)&(~((P)&(S)))))
|
||||
#define ROP_PSDPSaoxx(D,S,P) ((P)^((S)^((D)|((P)&(S)))))
|
||||
#define ROP_DPSxan(D,S,P) (~((D)&((P)^(S))))
|
||||
#define ROP_PDSPxax(D,S,P) ((P)^((D)&((S)^(P))))
|
||||
#define ROP_SDPSaoxn(D,S,P) (~((S)^((D)|((P)&(S)))))
|
||||
#define ROP_DPSDanax(D,S,P) ((D)^((P)&(~((S)&(D)))))
|
||||
#define ROP_SPxDSxan(D,S,P) (~(((S)^(P))&((D)^(S))))
|
||||
#define ROP_SPDnao(D,S,P) ((S)|((P)&(~(D))))
|
||||
#define ROP_SDno(D,S,P) ((S)|(~(D)))
|
||||
#define ROP_SDPxo(D,S,P) ((S)|((D)^(P)))
|
||||
#define ROP_SDPano(D,S,P) ((S)|(~((D)&(P))))
|
||||
#define ROP_PDSoa(D,S,P) ((P)&((D)|(S)))
|
||||
#define ROP_PDSoxn(D,S,P) (~((P)^((D)|(S))))
|
||||
#define ROP_DSPDxax(D,S,P) ((D)^((S)&((P)^(D))))
|
||||
#define ROP_PSDPaoxn(D,S,P) (~((P)^((S)|((D)&(P)))))
|
||||
#define ROP_SDPSxax(D,S,P) ((S)^((D)&((P)^(S))))
|
||||
#define ROP_PDSPaoxn(D,S,P) (~((P)^((D)|((S)&(P)))))
|
||||
#define ROP_SDPSanax(D,S,P) ((S)^((D)&(~((P)&(S)))))
|
||||
#define ROP_SPxPDxan(D,S,P) (~(((S)^(P))&((P)^(D))))
|
||||
#define ROP_SSPxDSxax(D,S,P) ((S)^(((S)^(P))&((D)^(S))))
|
||||
#define ROP_DSPDSanaxxn(D,S,P) (~((D)^((S)^((P)&(~((D)&(S)))))))
|
||||
#define ROP_DPSao(D,S,P) ((D)|((P)&(S)))
|
||||
#define ROP_DPSxno(D,S,P) ((D)|(~((P)^(S))))
|
||||
#define ROP_SDPao(D,S,P) ((S)|((D)&(P)))
|
||||
#define ROP_SDPxno(D,S,P) ((S)|(~((D)^(P))))
|
||||
#define ROP_DSo(D,S,P) ((D)|(S)) /* SRCPAINT */
|
||||
#define ROP_SDPnoo(D,S,P) ((S)|((D)|(~(P))))
|
||||
#define ROP_P(D,S,P) (P) /* PATCOPY */
|
||||
#define ROP_PDSono(D,S,P) ((P)|(~((D)|(S))))
|
||||
#define ROP_PDSnao(D,S,P) ((P)|((D)&(~(S))))
|
||||
#define ROP_PSno(D,S,P) ((P)|(~(S)))
|
||||
#define ROP_PSDnao(D,S,P) ((P)|((S)&(~(D))))
|
||||
#define ROP_PDno(D,S,P) ((P)|(~(D)))
|
||||
#define ROP_PDSxo(D,S,P) ((P)|((D)^(S)))
|
||||
#define ROP_PDSano(D,S,P) ((P)|(~((D)&(S))))
|
||||
#define ROP_PDSao(D,S,P) ((P)|((D)&(S)))
|
||||
#define ROP_PDSxno(D,S,P) ((P)|(~((D)^(S))))
|
||||
#define ROP_DPo(D,S,P) ((D)|(P))
|
||||
#define ROP_DPSnoo(D,S,P) ((D)|((P)|(~(S)))) /* PATPAINT */
|
||||
#define ROP_PSo(D,S,P) ((P)|(S))
|
||||
#define ROP_PSDnoo(D,S,P) ((P)|((S)|(~(D))))
|
||||
#define ROP_DPSoo(D,S,P) ((D)|((P)|(S)))
|
||||
#define ROP_1(D,S,P) 1 /* WHITENESS */
|
||||
|
||||
#define ROP_BLACKNESS ROP_0
|
||||
#define ROP_NOTSRCERASE ROP_DSon
|
||||
#define ROP_NOTSRCCOPY ROP_Sn
|
||||
#define ROP_SRCERASE ROP_SDna
|
||||
#define ROP_DSTINVERT ROP_Dn
|
||||
#define ROP_PATINVERT ROP_DPx
|
||||
#define ROP_SRCINVERT ROP_DSx
|
||||
#define ROP_SRCAND ROP_DSa
|
||||
#define ROP_MERGEPAINT ROP_DSno
|
||||
#define ROP_MERGECOPY ROP_PSa
|
||||
#define ROP_SRCCOPY ROP_S
|
||||
#define ROP_SRCPAINT ROP_DSo
|
||||
#define ROP_PATCOPY ROP_P
|
||||
#define ROP_PATPAINT ROP_DPSnoo
|
||||
#define ROP_WHITENESS ROP_1
|
||||
|
||||
|
24
reactos/subsystems/win32/win32k/diblib/SrcPaint.c
Normal file
24
reactos/subsystems/win32/win32k/diblib/SrcPaint.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 0
|
||||
#define __USES_DEST 1
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME SrcPaint
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[0](D,S,0)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_SrcPaint(PBLTDATA pBltData)
|
||||
{
|
||||
// TODO: XLATEless same-surface variants
|
||||
gapfnSrcPaint[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
|
||||
|
||||
|
37
reactos/subsystems/win32/win32k/diblib/SrcPatBlt.c
Normal file
37
reactos/subsystems/win32/win32k/diblib/SrcPatBlt.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define __USES_SOURCE 1
|
||||
#define __USES_PATTERN 1
|
||||
#define __USES_DEST 0
|
||||
#define __USES_MASK 0
|
||||
|
||||
#define __FUNCTIONNAME SrcPatBlt
|
||||
|
||||
#define _DibDoRop(pBltData, M, D, S, P) pBltData->apfnDoRop[0](0,S,P)
|
||||
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
#undef __FUNCTIONNAME
|
||||
#define __FUNCTIONNAME SrcPatBlt_Solid
|
||||
#define __USES_SOLID_BRUSH 1
|
||||
#include "diblib_allsrcbpp.h"
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
Dib_SrcPatBlt(PBLTDATA pBltData)
|
||||
{
|
||||
/* Check for solid brush */
|
||||
if (pBltData->ulSolidColor != 0xFFFFFFFF)
|
||||
{
|
||||
/* Use the solid version of PATCOPY! */
|
||||
gapfnSrcPatBlt_Solid[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pattern version */
|
||||
gapfnSrcPatBlt[pBltData->siDst.iFormat][pBltData->siSrc.iFormat](pBltData);
|
||||
}
|
||||
}
|
||||
|
||||
|
282
reactos/subsystems/win32/win32k/diblib/engbitblt.c
Normal file
282
reactos/subsystems/win32/win32k/diblib/engbitblt.c
Normal file
|
@ -0,0 +1,282 @@
|
|||
|
||||
#include "DibLib.h"
|
||||
|
||||
#define ROP4_FGND(Rop4) ((Rop4) & 0x00FF)
|
||||
#define ROP4_BKGND(Rop4) (((Rop4) & 0xFF00) >> 8)
|
||||
|
||||
#define ROP4_USES_SOURCE(Rop4) (((((Rop4) & 0xCC00) >> 2) != ((Rop4) & 0x3300)) || ((((Rop4) & 0xCC) >> 2) != ((Rop4) & 0x33)))
|
||||
#define ROP4_USES_MASK(Rop4) (((Rop4) & 0xFF00) != (((Rop4) & 0xff) << 8))
|
||||
#define ROP4_USES_DEST(Rop4) (((((Rop4) & 0xAA) >> 1) != ((Rop4) & 0x55)) || ((((Rop4) & 0xAA00) >> 1) != ((Rop4) & 0x5500)))
|
||||
#define ROP4_USES_PATTERN(Rop4) (((((Rop4) & 0xF0) >> 4) != ((Rop4) & 0x0F)) || ((((Rop4) & 0xF000) >> 4) != ((Rop4) & 0x0F00)))
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG c;
|
||||
RECTL arcl[5];
|
||||
} RECT_ENUM;
|
||||
|
||||
static
|
||||
VOID
|
||||
AdjustOffsetAndSize(
|
||||
_Out_ PPOINTL pptOffset,
|
||||
_Out_ PSIZEL psizTrg,
|
||||
_In_ PPOINTL pptlSrc,
|
||||
_In_ PSIZEL psizSrc)
|
||||
{
|
||||
ULONG x, y, cxMax, cyMax;
|
||||
|
||||
x = pptlSrc->x + pptOffset->x;
|
||||
if (x < 0) pptOffset->x -= x, x = 0;
|
||||
|
||||
cxMax = psizSrc->cx - x;
|
||||
if (psizTrg->cx > cxMax) psizTrg->cx= cxMax;
|
||||
|
||||
y = pptlSrc->y + pptOffset->y;
|
||||
if (y < 0) pptOffset->y -= y, y = 0;
|
||||
|
||||
cyMax = psizSrc->cy - y;
|
||||
if (psizTrg->cy > cyMax) psizTrg->cy = cyMax;
|
||||
}
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
EngBitBlt(
|
||||
_Inout_ SURFOBJ *psoTrg,
|
||||
_In_opt_ SURFOBJ *psoSrc,
|
||||
_In_opt_ SURFOBJ *psoMask,
|
||||
_In_opt_ CLIPOBJ *pco,
|
||||
_In_opt_ XLATEOBJ *pxlo,
|
||||
_In_ RECTL *prclTrg,
|
||||
_When_(psoSrc, _In_) POINTL *pptlSrc,
|
||||
_When_(psoMask, _In_) POINTL *pptlMask,
|
||||
_In_opt_ BRUSHOBJ *pbo,
|
||||
_When_(pbo, _In_) POINTL *pptlBrush,
|
||||
_In_ ROP4 rop4)
|
||||
{
|
||||
BLTDATA bltdata;
|
||||
ULONG i, iDComplexity, iDirection, rop3Fg, iFunctionIndex;
|
||||
RECTL rcTrg;
|
||||
POINTL ptOffset, ptSrc, ptMask;
|
||||
SIZEL sizTrg;
|
||||
PFN_DIBFUNCTION pfnBitBlt;
|
||||
BOOL bEnumMore;
|
||||
RECT_ENUM rcenum;
|
||||
|
||||
/* Clip the target rect to the extents of the target surface */
|
||||
rcTrg.left = min(prclTrg->left, 0);
|
||||
rcTrg.top = min(prclTrg->top, 0);
|
||||
rcTrg.right = min(prclTrg->right, psoTrg->sizlBitmap.cx);
|
||||
rcTrg.bottom = min(prclTrg->bottom, psoTrg->sizlBitmap.cy);
|
||||
|
||||
/* Check if there is a clipping region */
|
||||
iDComplexity = pco ? pco->iDComplexity : DC_TRIVIAL;
|
||||
if (iDComplexity != DC_TRIVIAL)
|
||||
{
|
||||
/* Clip the target rect to the bounds of the clipping region */
|
||||
RECTL_bIntersectRect(&rcTrg, prclTrg, &pco->rclBounds);
|
||||
}
|
||||
|
||||
/* Calculate initial offset and size */
|
||||
ptOffset.x = rcTrg.left - prclTrg->left;
|
||||
ptOffset.y = rcTrg.top - prclTrg->top;
|
||||
sizTrg.cx = rcTrg.right - rcTrg.left;
|
||||
sizTrg.cy = rcTrg.bottom - rcTrg.top;
|
||||
|
||||
/* Check if the ROP uses a source */
|
||||
if (ROP4_USES_SOURCE(rop4))
|
||||
{
|
||||
/* Must have a source surface and point */
|
||||
if (!psoSrc || !pptlSrc) return FALSE;
|
||||
|
||||
/* Get the source point */
|
||||
ptSrc = *pptlSrc;
|
||||
|
||||
/* Clip against the extents of the source surface */
|
||||
AdjustOffsetAndSize(&ptOffset, &sizTrg, &ptSrc, &psoSrc->sizlBitmap);
|
||||
|
||||
/* Check if source and target are equal */
|
||||
if (psoSrc == psoTrg)
|
||||
{
|
||||
/* Use 0 to mark source as equal to target */
|
||||
bltdata.siSrc.iFormat = 0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bltdata.siSrc.iFormat = psoSrc->iBitmapFormat;
|
||||
}
|
||||
bltdata.siSrc.pjBase = psoSrc->pvScan0;
|
||||
bltdata.siSrc.lDelta = psoSrc->lDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptSrc.x = 0;
|
||||
ptSrc.y = 0;
|
||||
}
|
||||
|
||||
/* Check if the ROP uses a mask */
|
||||
if (ROP4_USES_MASK(rop4))
|
||||
{
|
||||
/* Must have a mask surface and point */
|
||||
if (!psoMask || !pptlMask) return FALSE;
|
||||
|
||||
/* Get the mask point */
|
||||
ptMask = *pptlMask;
|
||||
|
||||
/* Clip against the extents of the mask surface */
|
||||
AdjustOffsetAndSize(&ptOffset, &sizTrg, &ptMask, &psoMask->sizlBitmap);
|
||||
|
||||
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
|
||||
bltdata.siMsk.pjBase = psoMask->pvScan0;
|
||||
bltdata.siMsk.lDelta = psoMask->lDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptMask.x = 0;
|
||||
ptMask.y = 0;
|
||||
}
|
||||
|
||||
/* Adjust the points */
|
||||
ptSrc.x += ptOffset.x;
|
||||
ptSrc.y += ptOffset.y;
|
||||
ptMask.x += ptOffset.x;
|
||||
ptMask.y += ptOffset.y;
|
||||
|
||||
/* Recalculate the target rect */
|
||||
rcTrg.left = prclTrg->left + ptOffset.x;
|
||||
rcTrg.top = prclTrg->top + ptOffset.y;
|
||||
rcTrg.right = rcTrg.left + sizTrg.cx;
|
||||
rcTrg.bottom = rcTrg.top + sizTrg.cy;
|
||||
|
||||
bltdata.ulWidth = prclTrg->right - prclTrg->left;
|
||||
bltdata.ulHeight = prclTrg->bottom - prclTrg->top;
|
||||
bltdata.pxlo = pxlo;
|
||||
bltdata.rop4 = rop4;
|
||||
|
||||
bltdata.siDst.iFormat = psoTrg->iBitmapFormat;
|
||||
bltdata.siDst.pjBase = psoTrg->pvScan0;
|
||||
bltdata.siDst.lDelta = psoTrg->lDelta;
|
||||
bltdata.siDst.ptOrig.x = prclTrg->left;
|
||||
bltdata.siDst.ptOrig.y = prclTrg->top;
|
||||
|
||||
|
||||
/* Check of the ROP uses a pattern / brush */
|
||||
if (ROP4_USES_PATTERN(rop4))
|
||||
{
|
||||
/* Must have a brush */
|
||||
if (!pbo) return FALSE;
|
||||
|
||||
/* Copy the solid color */
|
||||
bltdata.ulSolidColor = pbo->iSolidColor;
|
||||
|
||||
/* Check if this is a pattern brush */
|
||||
if (pbo->iSolidColor == 0xFFFFFFFF)
|
||||
{
|
||||
// FIXME: use EBRUSHOBJ
|
||||
|
||||
bltdata.siPat.iFormat = 0;//psoPat->iBitmapFormat;
|
||||
bltdata.siPat.pjBase = 0;//psoPat->pvScan0;
|
||||
bltdata.siPat.lDelta = 0;//psoPat->lDelta;
|
||||
bltdata.siPat.ptOrig = *pptlBrush;
|
||||
|
||||
bltdata.ulPatWidth = 0;
|
||||
bltdata.ulPatHeight = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Analyze the copying direction */
|
||||
if (psoTrg == psoSrc)
|
||||
{
|
||||
if (rcTrg.top < ptSrc.y)
|
||||
iDirection = rcTrg.left < ptSrc.x ? CD_RIGHTDOWN : CD_LEFTDOWN;
|
||||
else
|
||||
iDirection = rcTrg.left < ptSrc.x ? CD_RIGHTUP : CD_LEFTUP;
|
||||
}
|
||||
else
|
||||
iDirection = CD_ANY;
|
||||
|
||||
/* Check if this is a masking ROP */
|
||||
if (ROP4_USES_MASK(rop4))
|
||||
{
|
||||
bltdata.apfnDoRop[0] = gapfnRop[ROP4_BKGND(rop4)];
|
||||
bltdata.apfnDoRop[1] = gapfnRop[ROP4_FGND(rop4)];
|
||||
}
|
||||
|
||||
/* Get the foreground ROP index */
|
||||
rop3Fg = ROP4_FGND(rop4);
|
||||
|
||||
/* Get the function index */
|
||||
iFunctionIndex = aiIndexPerRop[rop3Fg];
|
||||
|
||||
/* Get the dib function */
|
||||
pfnBitBlt = apfnDibFunction[iFunctionIndex];
|
||||
|
||||
/* Check if we need to enumerate rects */
|
||||
if (iDComplexity == DC_COMPLEX)
|
||||
{
|
||||
/* Start the enumeration of the clip object */
|
||||
CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, iDirection, 0);
|
||||
do
|
||||
{
|
||||
/* Enumerate a set of rectangles */
|
||||
bEnumMore = CLIPOBJ_bEnum(pco, sizeof(rcenum), (ULONG*)&rcenum);
|
||||
|
||||
/* Loop all rectangles we got */
|
||||
for (i = 0; i < rcenum.c; i++)
|
||||
{
|
||||
/* Intersect this rect with the already calculated bounds rect */
|
||||
if (!RECTL_bIntersectRect(&rcenum.arcl[i], &rcenum.arcl[i], &rcTrg))
|
||||
{
|
||||
/* This rect is outside the valid bounds, continue */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Copy the target start point */
|
||||
bltdata.siDst.ptOrig.x = rcenum.arcl[i].left;
|
||||
bltdata.siDst.ptOrig.x = rcenum.arcl[i].top;
|
||||
|
||||
/* Calculate width and height of this rect */
|
||||
bltdata.ulWidth = rcenum.arcl[i].right - rcenum.arcl[i].left;
|
||||
bltdata.ulHeight = rcenum.arcl[i].bottom - rcenum.arcl[i].top;
|
||||
|
||||
/* Calculate the offset of this rect from the original coordinates */
|
||||
ptOffset.x = rcenum.arcl[i].left - prclTrg->left;
|
||||
ptOffset.y = rcenum.arcl[i].top - prclTrg->top;
|
||||
|
||||
/* Calculate current origin for source and mask */
|
||||
bltdata.siSrc.ptOrig.x = pptlSrc->x + ptOffset.x;
|
||||
bltdata.siSrc.ptOrig.y = pptlSrc->y + ptOffset.y;
|
||||
bltdata.siMsk.ptOrig.x = pptlMask->x + ptOffset.x;
|
||||
bltdata.siMsk.ptOrig.y = pptlMask->y + ptOffset.y;
|
||||
|
||||
//bltdata.siPat.ptOrig.x = (pptlMask->x + ptOffset.x) % psoMask->sizlBitmap.cx;
|
||||
//bltdata.siPat.ptOrig.y = (pptlMask->y + ptOffset.y) % psoMask->sizlBitmap.cx;
|
||||
|
||||
}
|
||||
}
|
||||
while (bEnumMore);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Call the dib function */
|
||||
pfnBitBlt(&bltdata);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
XLATEOBJ_iXlate(XLATEOBJ *pxlo, ULONG ulColor)
|
||||
{
|
||||
return ulColor;
|
||||
}
|
||||
|
||||
BOOL
|
||||
//__fastcall
|
||||
RECTL_bIntersectRect(RECTL* prclDst, const RECTL* prcl1, const RECTL* prcl2)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in a new issue