Author: tkreuzer
Date: Fri Mar 23 11:20:24 2012
New Revision: 56215
URL:
http://svn.reactos.org/svn/reactos?rev=56215&view=rev
Log:
[DIBLIB]
- add table for masking rops
- consity some tables
- Fix some typos
Modified:
trunk/reactos/subsystems/win32/win32k/diblib/DibLib.c
trunk/reactos/subsystems/win32/win32k/diblib/DibLib.h
trunk/reactos/subsystems/win32/win32k/diblib/DibLib_interface.h
trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.c
trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.h
Modified: trunk/reactos/subsystems/win32/win32k/diblib/DibLib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/diblib/DibLib.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/diblib/DibLib.c [iso-8859-1] Fri Mar 23 11:20:24
2012
@@ -1,7 +1,29 @@
#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
{
@@ -28,9 +50,8 @@
INDEX_BitBlt,
};
-
-PFN_DIBFUNCTION
-apfnDibFunction[] =
+const PFN_DIBFUNCTION
+gapfnDibFunction[] =
{
Dib_BitBlt_NOOP,
Dib_BitBlt_DSTINVERT,
@@ -55,8 +76,8 @@
Dib_BitBlt,
};
-UCHAR
-aiIndexPerRop[256] =
+const UCHAR
+gajIndexPerRop[256] =
{
INDEX_BitBlt_BLACKNESS, // BLACKNESS
INDEX_BitBlt, // DPSoon,
@@ -316,3 +337,15 @@
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
+};
Modified: trunk/reactos/subsystems/win32/win32k/diblib/DibLib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/diblib/DibLib.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/diblib/DibLib.h [iso-8859-1] Fri Mar 23 11:20:24
2012
@@ -20,9 +20,9 @@
typedef
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"
@@ -63,15 +63,15 @@
#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 _NextPixel_16(ppj, pjShift) (void)(*(ppj) += 2)
+#define _NextPixelR2L_16(ppj, pjShift) (void)(*(ppj) -= 2)
#define _SHIFT_16(x)
#define _CALCSHIFT_16(pShift, 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 _NextPixel_24(ppj, pjShift) (void)(*(ppj) += 3)
+#define _NextPixelR2L_24(ppj, pjShift) (void)(*(ppj) -= 3)
#define _SHIFT_24(x)
#define _CALCSHIFT_24(pShift, x)
Modified: trunk/reactos/subsystems/win32/win32k/diblib/DibLib_interface.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/diblib/DibLib_interface.h [iso-8859-1]
(original)
+++ trunk/reactos/subsystems/win32/win32k/diblib/DibLib_interface.h [iso-8859-1] Fri Mar
23 11:20:24 2012
@@ -58,7 +58,17 @@
VOID FASTCALL Dib_SrcPaint(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 PFN_DIBFUNCTION apfnDibFunction[];
-extern UCHAR aiIndexPerRop[256];
+extern const UCHAR gajIndexPerRop[256];
+extern const PFN_DIBFUNCTION gapfnDibFunction[];
+extern const PFN_DIBFUNCTION gapfnMaskFunction[8];
+
Modified: trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.c [iso-8859-1] Fri Mar 23
11:20:24 2012
@@ -1283,7 +1283,7 @@
return ROP_1(D,S,P);
}
-PFN_DOROP
+const PFN_DOROP
gapfnRop[256] =
{
DoRop_0, // BLACKNESS
Modified: trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/diblib/RopFunctions.h [iso-8859-1] Fri Mar 23
11:20:24 2012
@@ -4,7 +4,7 @@
(__fastcall
*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_DPSoon(D,S,P) (~((D)|((P)|(S))))