Author: tkreuzer
Date: Fri Mar 23 11:29:44 2012
New Revision: 56216

URL: http://svn.reactos.org/svn/reactos?rev=56216&view=rev
Log:
[WIN32K]
- Add a trivial XLATEOBJ as a global variable.
- Make sure the XLATEOBJ is not NULL, when calling the diblib code
- Remove the IntEngMaskBlt stub, its a very special function for font 
rendering, keep the old one
- Add more driver debug assertions
- Remove obsolete definition

Modified:
    trunk/reactos/subsystems/win32/win32k/dib/dib.h
    trunk/reactos/subsystems/win32/win32k/eng/bitblt_new.c
    trunk/reactos/subsystems/win32/win32k/eng/drvdbg.c
    trunk/reactos/subsystems/win32/win32k/eng/xlate.c
    trunk/reactos/subsystems/win32/win32k/include/xlateobj.h

Modified: trunk/reactos/subsystems/win32/win32k/dib/dib.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/dib/dib.h?rev=56216&r1=56215&r2=56216&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dib.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/dib/dib.h [iso-8859-1] Fri Mar 23 
11:29:44 2012
@@ -1,8 +1,4 @@
 #pragma once
-
-#ifdef _M_IX86
-#define memset4(dest, value, count) asm volatile("rep stosl" : : "D"(dest), 
"a"(value), "c"(count) : "memory");
-#endif
 
 #define ROP4_BLACKNESS    ((((0x00000042) >> 8) & 0xff00) | (((0x00000042) >> 
16) & 0x00ff))
 #define ROP4_NOTSRCERASE  ((((0x001100A6) >> 8) & 0xff00) | (((0x001100A6) >> 
16) & 0x00ff))

Modified: trunk/reactos/subsystems/win32/win32k/eng/bitblt_new.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng/bitblt_new.c?rev=56216&r1=56215&r2=56216&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/bitblt_new.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/eng/bitblt_new.c [iso-8859-1] Fri Mar 
23 11:29:44 2012
@@ -98,7 +98,6 @@
     RECT_ENUM rcenum;
     PSIZEL psizlPat;
 
-__debugbreak();
 
     ASSERT(psoTrg);
     ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP);
@@ -112,6 +111,7 @@
     rcTrg = *prclTrg;
 
     bltdata.rop4 = rop4;
+    if (!pxlo) pxlo = &gexloTrivial.xlo;
     bltdata.pxlo = pxlo;
     bltdata.pfnXlate = XLATEOBJ_pfnXlate(pxlo);
 
@@ -170,7 +170,7 @@
         bltdata.siDst.iFormat = psoTrg->iBitmapFormat;
     }
 
-    /* Check of the ROP uses a pattern / brush */
+    /* Check if the ROP uses a pattern / brush */
     if (ROP4_USES_PATTERN(rop4))
     {
         /* Must have a brush */
@@ -213,6 +213,8 @@
         ASSERT(psoMask);
         ASSERT(pptlMask);
 
+        __debugbreak();
+
         bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
         bltdata.siMsk.pvScan0 = psoMask->pvScan0;
         bltdata.siMsk.lDelta = psoMask->lDelta;
@@ -220,17 +222,21 @@
         bltdata.apfnDoRop[0] = gapfnRop[ROP4_BKGND(rop4)];
         bltdata.apfnDoRop[1] = gapfnRop[ROP4_FGND(rop4)];
 
-        ASSERT(FALSE);
-        // get masking function!
-        pfnBitBlt = 0;
+        /* Calculate the masking function index */
+        iFunctionIndex = ROP4_USES_PATTERN(rop4) ? 1 : 0;
+        iFunctionIndex |= ROP4_USES_SOURCE(rop4) ? 2 : 0;
+        iFunctionIndex |= ROP4_USES_DEST(rop4) ? 4 : 0;
+
+        /* Get the masking function */
+        pfnBitBlt = gapfnMaskFunction[iFunctionIndex];
     }
     else
     {
         /* Get the function index from the foreground ROP index*/
-        iFunctionIndex = aiIndexPerRop[ROP4_FGND(rop4)];
+        iFunctionIndex = gajIndexPerRop[ROP4_FGND(rop4)];
 
         /* Get the dib function */
-        pfnBitBlt = apfnDibFunction[iFunctionIndex];
+        pfnBitBlt = gapfnDibFunction[iFunctionIndex];
     }
 
     /* If no clip object is given, use trivial one */
@@ -557,20 +563,4 @@
     return bResult;
 }
 
-BOOL
-NTAPI
-IntEngMaskBlt(
-    SURFOBJ *psoDest,
-    SURFOBJ *psoMask,
-    CLIPOBJ *pco,
-    XLATEOBJ *pxloDest,
-    XLATEOBJ *pxloSource,
-    RECTL *DestRect,
-    POINTL *pptlMask,
-    BRUSHOBJ *pbo,
-    POINTL *pptlBrushOrigin)
-{
-    ASSERT(FALSE);
-    return 0;
-}
-
+

Modified: trunk/reactos/subsystems/win32/win32k/eng/drvdbg.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng/drvdbg.c?rev=56216&r1=56215&r2=56216&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/drvdbg.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/drvdbg.c [iso-8859-1] Fri Mar 23 
11:29:44 2012
@@ -307,6 +307,8 @@
     ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx);
     ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy);
     ASSERT(RECTL_bIsWellOrdered(prclTrg));
+    ASSERT(pco);
+    ASSERT(pco->iDComplexity != DC_RECT);
 
     if (ROP4_USES_SOURCE(rop4))
     {

Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng/xlate.c?rev=56216&r1=56215&r2=56216&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Fri Mar 23 
11:29:44 2012
@@ -14,13 +14,15 @@
 
 /** Globals 
*******************************************************************/
 
-ULONG giUniqueXlate = 0;
-
-const BYTE gajXlate5to8[32] =
+EXLATEOBJ gexloTrivial = {{0, XO_TRIVIAL, 0, 0, 0, 0}, 
EXLATEOBJ_iXlateTrivial};
+
+static ULONG giUniqueXlate = 0;
+
+static const BYTE gajXlate5to8[32] =
 {  0,  8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99,107,115,123,
  132,140,148,156,165,173,181,189,197,206,214,222,231,239,247,255};
 
-const BYTE gajXlate6to8[64] =
+static const BYTE gajXlate6to8[64] =
 { 0,  4,  8, 12, 16, 20, 24, 28, 32, 36, 40, 45, 49, 52, 57, 61,
  65, 69, 73, 77, 81, 85, 89, 93, 97,101,105,109,113,117,121,125,
 130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,

Modified: trunk/reactos/subsystems/win32/win32k/include/xlateobj.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/xlateobj.h?rev=56216&r1=56215&r2=56216&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/xlateobj.h [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/include/xlateobj.h [iso-8859-1] Fri 
Mar 23 11:29:44 2012
@@ -38,6 +38,19 @@
     };
 } EXLATEOBJ, *PEXLATEOBJ;
 
+PFN_XLATE
+FORCEINLINE
+XLATEOBJ_pfnXlate(XLATEOBJ *pxlo)
+{
+    return ((PEXLATEOBJ)pxlo)->pfnXlate;
+}
+
+extern EXLATEOBJ gexloTrivial;
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlateTrivial(PEXLATEOBJ pexlo, ULONG iColor);
+
 void
 DbgCmpXlate(XLATEOBJ *pxlo1, XLATEOBJ *pxlo2);
 


Reply via email to