mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[DIBLIB]
- add table for masking rops - consity some tables - Fix some typos svn path=/trunk/; revision=56215
This commit is contained in:
parent
e658cf65ee
commit
a19a8e0fa8
5 changed files with 59 additions and 16 deletions
|
@ -1,7 +1,29 @@
|
||||||
|
|
||||||
#include "DibLib.h"
|
#include "DibLib.h"
|
||||||
|
|
||||||
BYTE ajShift4[2] = {4, 0};
|
/*
|
||||||
|
* M D S P Generic function
|
||||||
|
* -----------------------
|
||||||
|
* 0 0 0 0 -> BLACKNESS, WHITENESS
|
||||||
|
* 0 0 0 1 -> PATCOPY, NOTPATCOPY
|
||||||
|
* 0 0 1 0 -> SRCCOPY, NOTSRCCOPY
|
||||||
|
* 0 0 1 1 SrcPatBlt
|
||||||
|
* 0 1 0 0 -> NOOP, DESTINVERT
|
||||||
|
* 0 1 0 1 PatPaint
|
||||||
|
* 0 1 1 0 SrcPaint
|
||||||
|
* 0 1 1 1 BitBlt
|
||||||
|
* 1 0 0 0 MaskCopy, -> SRCCOPY / SRCINVERT using Mask als source
|
||||||
|
* 1 0 0 1 MaskPatBlt
|
||||||
|
* 1 0 1 0 MaskSrcBlt
|
||||||
|
* 1 0 1 1 MaskSrcPatBlt
|
||||||
|
* 1 1 0 0 MaskPaint
|
||||||
|
* 1 1 0 1 MaskPatPaint
|
||||||
|
* 1 1 1 0 MaskSrcPaint
|
||||||
|
* 1 1 1 1 MaskBlt
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
const BYTE ajShift4[2] = {4, 0};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -28,9 +50,8 @@ enum
|
||||||
INDEX_BitBlt,
|
INDEX_BitBlt,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PFN_DIBFUNCTION
|
||||||
PFN_DIBFUNCTION
|
gapfnDibFunction[] =
|
||||||
apfnDibFunction[] =
|
|
||||||
{
|
{
|
||||||
Dib_BitBlt_NOOP,
|
Dib_BitBlt_NOOP,
|
||||||
Dib_BitBlt_DSTINVERT,
|
Dib_BitBlt_DSTINVERT,
|
||||||
|
@ -55,8 +76,8 @@ apfnDibFunction[] =
|
||||||
Dib_BitBlt,
|
Dib_BitBlt,
|
||||||
};
|
};
|
||||||
|
|
||||||
UCHAR
|
const UCHAR
|
||||||
aiIndexPerRop[256] =
|
gajIndexPerRop[256] =
|
||||||
{
|
{
|
||||||
INDEX_BitBlt_BLACKNESS, // BLACKNESS
|
INDEX_BitBlt_BLACKNESS, // BLACKNESS
|
||||||
INDEX_BitBlt, // DPSoon,
|
INDEX_BitBlt, // DPSoon,
|
||||||
|
@ -316,3 +337,15 @@ aiIndexPerRop[256] =
|
||||||
INDEX_BitBlt_WHITENESS //WHITENESS
|
INDEX_BitBlt_WHITENESS //WHITENESS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PFN_DIBFUNCTION
|
||||||
|
gapfnMaskFunction[8] =
|
||||||
|
{
|
||||||
|
Dib_MaskCopy,
|
||||||
|
Dib_MaskPatBlt,
|
||||||
|
Dib_MaskSrcBlt,
|
||||||
|
Dib_MaskSrcPatBlt,
|
||||||
|
Dib_MaskPaint,
|
||||||
|
Dib_MaskPatPaint,
|
||||||
|
Dib_MaskSrcPaint,
|
||||||
|
Dib_MaskBlt
|
||||||
|
};
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
ULONG
|
ULONG
|
||||||
(NTAPI *PFN_XLATE)(XLATEOBJ* pxlo, ULONG ulColor);
|
(FASTCALL *PFN_XLATE)(XLATEOBJ* pxlo, ULONG ulColor);
|
||||||
|
|
||||||
extern BYTE ajShift4[2];
|
extern const BYTE ajShift4[2];
|
||||||
|
|
||||||
#include "DibLib_interface.h"
|
#include "DibLib_interface.h"
|
||||||
|
|
||||||
|
@ -63,15 +63,15 @@ extern BYTE ajShift4[2];
|
||||||
|
|
||||||
#define _ReadPixel_16(pjSource, x) (*(USHORT*)(pjSource))
|
#define _ReadPixel_16(pjSource, x) (*(USHORT*)(pjSource))
|
||||||
#define _WritePixel_16(pjDest, x, ulColor) (void)(*(USHORT*)(pjDest) = (USHORT)(ulColor))
|
#define _WritePixel_16(pjDest, x, ulColor) (void)(*(USHORT*)(pjDest) = (USHORT)(ulColor))
|
||||||
#define _NextPixel_16(ppj, pjShift) (void)(*(ppj) -= 2)
|
#define _NextPixel_16(ppj, pjShift) (void)(*(ppj) += 2)
|
||||||
#define _NextPixelR2L_16(ppj, pjShift) (void)(*(ppj) += 2)
|
#define _NextPixelR2L_16(ppj, pjShift) (void)(*(ppj) -= 2)
|
||||||
#define _SHIFT_16(x)
|
#define _SHIFT_16(x)
|
||||||
#define _CALCSHIFT_16(pShift, x)
|
#define _CALCSHIFT_16(pShift, x)
|
||||||
|
|
||||||
#define _ReadPixel_24(pjSource, x) ((pjSource)[0] | ((pjSource)[1] << 8) | ((pjSource)[2] << 16))
|
#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 _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 _NextPixel_24(ppj, pjShift) (void)(*(ppj) += 3)
|
||||||
#define _NextPixelR2L_24(ppj, pjShift) (void)(*(ppj) += 3)
|
#define _NextPixelR2L_24(ppj, pjShift) (void)(*(ppj) -= 3)
|
||||||
#define _SHIFT_24(x)
|
#define _SHIFT_24(x)
|
||||||
#define _CALCSHIFT_24(pShift, x)
|
#define _CALCSHIFT_24(pShift, x)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,17 @@ VOID FASTCALL Dib_PatPaint(PBLTDATA pBltData);
|
||||||
VOID FASTCALL Dib_SrcPaint(PBLTDATA pBltData);
|
VOID FASTCALL Dib_SrcPaint(PBLTDATA pBltData);
|
||||||
VOID FASTCALL Dib_BitBlt(PBLTDATA pBltData);
|
VOID FASTCALL Dib_BitBlt(PBLTDATA pBltData);
|
||||||
|
|
||||||
|
VOID FASTCALL Dib_MaskCopy(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskPatBlt(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskSrcBlt(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskSrcPatBlt(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskPaint(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskPatPaint(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskSrcPaint(PBLTDATA pBltData);
|
||||||
|
VOID FASTCALL Dib_MaskBlt(PBLTDATA pBltData);
|
||||||
|
|
||||||
|
extern const UCHAR gajIndexPerRop[256];
|
||||||
|
extern const PFN_DIBFUNCTION gapfnDibFunction[];
|
||||||
|
extern const PFN_DIBFUNCTION gapfnMaskFunction[8];
|
||||||
|
|
||||||
extern PFN_DIBFUNCTION apfnDibFunction[];
|
|
||||||
extern UCHAR aiIndexPerRop[256];
|
|
||||||
|
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ ULONG FASTCALL DoRop_1(ULONG D, ULONG S, ULONG P)
|
||||||
return ROP_1(D,S,P);
|
return ROP_1(D,S,P);
|
||||||
}
|
}
|
||||||
|
|
||||||
PFN_DOROP
|
const PFN_DOROP
|
||||||
gapfnRop[256] =
|
gapfnRop[256] =
|
||||||
{
|
{
|
||||||
DoRop_0, // BLACKNESS
|
DoRop_0, // BLACKNESS
|
||||||
|
|
|
@ -4,7 +4,7 @@ ULONG
|
||||||
(__fastcall
|
(__fastcall
|
||||||
*PFN_DOROP)(ULONG D, ULONG S, ULONG P);
|
*PFN_DOROP)(ULONG D, ULONG S, ULONG P);
|
||||||
|
|
||||||
PFN_DOROP gapfnRop[256];
|
extern const PFN_DOROP gapfnRop[256];
|
||||||
|
|
||||||
#define ROP_0(D,S,P) 0 /* BLACKNESS */
|
#define ROP_0(D,S,P) 0 /* BLACKNESS */
|
||||||
#define ROP_DPSoon(D,S,P) (~((D)|((P)|(S))))
|
#define ROP_DPSoon(D,S,P) (~((D)|((P)|(S))))
|
||||||
|
|
Loading…
Reference in a new issue