Commit in reactos/subsys/win32k on MAIN
dib/dib.c+2-21.8 -> 1.9
   /dib.h+1-11.18 -> 1.19
   /dib16bpp.c+55-71.23 -> 1.24
   /dib24bpp.c+29-21.19 -> 1.20
   /dib32bpp.c+8-151.19 -> 1.20
eng/bitblt.c+1-31.44 -> 1.45
   /gradient.c+4-31.6 -> 1.7
   /transblt.c+18-21.14 -> 1.15
include/inteng.h+21.11 -> 1.12
+120-35
9 modified files
implemented TransparentBlt() on 16bpp and 24bpp surfaces

reactos/subsys/win32k/dib
dib.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- dib.c	6 Apr 2004 17:54:32 -0000	1.8
+++ dib.c	6 Apr 2004 21:53:48 -0000	1.9
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib.c,v 1.8 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: dib.c,v 1.9 2004/04/06 21:53:48 weiden Exp $ */
 
 #include <windows.h>
 #include <ddk/winddi.h>
@@ -68,7 +68,7 @@
 }
 
 ULONG
-DIB_GetOriginalSource(SURFOBJ* SourceSurf, SURFGDI* SourceGDI, ULONG sx, ULONG sy)
+DIB_GetSourceIndex(SURFOBJ* SourceSurf, SURFGDI* SourceGDI, ULONG sx, ULONG sy)
 {
   switch (SourceGDI->BitsPerPixel)
     {

reactos/subsys/win32k/dib
dib.h 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- dib.h	6 Apr 2004 17:54:32 -0000	1.18
+++ dib.h	6 Apr 2004 21:53:48 -0000	1.19
@@ -3,7 +3,7 @@
 #define MASK1BPP(x) (1<<(7-((x)&7)))
 ULONG   DIB_DoRop(ULONG Rop, ULONG Dest, ULONG Source, ULONG Pattern);
 ULONG   DIB_GetSource(SURFOBJ* SourceSurf, SURFGDI* SourceGDI, ULONG sx, ULONG sy, XLATEOBJ* ColorTranslation);
-ULONG   DIB_GetOriginalSource(SURFOBJ* SourceSurf, SURFGDI* SourceGDI, ULONG sx, ULONG sy);
+ULONG   DIB_GetSourceIndex(SURFOBJ* SourceSurf, SURFGDI* SourceGDI, ULONG sx, ULONG sy);
 
 VOID    DIB_1BPP_PutPixel(SURFOBJ* SurfObj, LONG x, LONG y, ULONG c);
 ULONG   DIB_1BPP_GetPixel(SURFOBJ* SurfObj, LONG x, LONG y);

reactos/subsys/win32k/dib
dib16bpp.c 1.23 -> 1.24
diff -u -r1.23 -r1.24
--- dib16bpp.c	6 Apr 2004 17:54:32 -0000	1.23
+++ dib16bpp.c	6 Apr 2004 21:53:48 -0000	1.24
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib16bpp.c,v 1.23 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: dib16bpp.c,v 1.24 2004/04/06 21:53:48 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -283,7 +283,7 @@
 {
    ULONG X, Y;
    ULONG SourceX, SourceY;
-   ULONG Dest, Source, Pattern = 0;
+   ULONG wd, Dest, Source, Pattern = 0;
    PULONG DestBits;
    BOOL UsesSource;
    BOOL UsesPattern;
@@ -333,7 +333,8 @@
          PatternHeight = PatternObj->sizlBitmap.cy;
       }
    }
-
+   
+   wd = ((DestRect->right - DestRect->left) << 1) - DestSurf->lDelta;
    RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x1);
    SourceY = SourcePoint->y;
    DestBits = (PULONG)(
@@ -394,9 +395,7 @@
 
       SourceY++;
       DestBits = (PULONG)(
-         (ULONG_PTR)DestBits -
-         ((DestRect->right - DestRect->left) << 1) +
-         DestSurf->lDelta);
+         (ULONG_PTR)DestBits - wd);
    }
 
    if (PatternSurface != NULL)
@@ -608,7 +607,56 @@
                          RECTL*  DestRect,  POINTL  *SourcePoint,
                          XLATEOBJ *ColorTranslation, ULONG iTransColor)
 {
-  return FALSE;
+  ULONG X, Y, SourceX, SourceY, Source, wd, Dest;
+  LONG RoundedRight;
+  ULONG *DestBits;
+  
+  RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x1);
+  SourceY = SourcePoint->y;
+  DestBits = (ULONG*)(DestSurf->pvScan0 +
+                      (DestRect->left << 1) +
+                      DestRect->top * DestSurf->lDelta);
+  wd = ((DestRect->right - DestRect->left) << 1) - DestSurf->lDelta;
+  
+  for(Y = DestRect->top; Y < DestRect->bottom; Y++)
+  {
+    SourceX = SourcePoint->x;
+    for(X = DestRect->left; X < RoundedRight; X += 2, DestBits++, SourceX += 2)
+    {
+      Dest = *DestBits;
+      
+      Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX, SourceY);
+      if(Source != iTransColor)
+      {
+        Dest &= 0xFFFF0000;
+        Dest |= (XLATEOBJ_iXlate(ColorTranslation, Source) & 0xFFFF);
+      }
+
+      Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX + 1, SourceY);
+      if(Source != iTransColor)
+      {
+        Dest &= 0xFFFF;
+        Dest |= (XLATEOBJ_iXlate(ColorTranslation, Source) << 16);
+      }
+
+      *DestBits = Dest;
+    }
+    
+    if(X < DestRect->right)
+    {
+      Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX, SourceY);
+      if(Source != iTransColor)
+      {
+        *((USHORT*)DestBits) = (USHORT)(XLATEOBJ_iXlate(ColorTranslation, Source) << 16);
+      }
+      
+      DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
+    }
+    SourceY++;
+    DestBits = (ULONG*)((ULONG_PTR)DestBits - wd);
+  }
+  
+  return TRUE;
 }
 
 /* EOF */

reactos/subsys/win32k/dib
dib24bpp.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- dib24bpp.c	6 Apr 2004 17:54:32 -0000	1.19
+++ dib24bpp.c	6 Apr 2004 21:53:48 -0000	1.20
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib24bpp.c,v 1.19 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: dib24bpp.c,v 1.20 2004/04/06 21:53:48 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -367,7 +367,34 @@
                          RECTL*  DestRect,  POINTL  *SourcePoint,
                          XLATEOBJ *ColorTranslation, ULONG iTransColor)
 {
-  return FALSE;
+  ULONG X, Y, SourceX, SourceY, Source, wd, Dest;
+  BYTE *DestBits;
+  
+  SourceY = SourcePoint->y;
+  DestBits = (BYTE*)(DestSurf->pvScan0 +
+                      (DestRect->left << 2) +
+                      DestRect->top * DestSurf->lDelta);
+  wd = ((DestRect->right - DestRect->left) << 2) - DestSurf->lDelta;
+  
+  for(Y = DestRect->top; Y < DestRect->bottom; Y++)
+  {
+    SourceX = SourcePoint->x;
+    for(X = DestRect->left; X < DestRect->right; X++, DestBits += 3, SourceX++)
+    {
+      Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX, SourceY);
+      if(Source != iTransColor)
+      {
+        Dest = XLATEOBJ_iXlate(ColorTranslation, Source) & 0xFFFFFF;
+         *(PUSHORT)(DestBits) = Dest & 0xFFFF;
+         *(DestBits + 2) = Dest >> 16;
+      }
+    }
+    
+    SourceY++;
+    DestBits = (BYTE*)((ULONG_PTR)DestBits - wd);
+  }
+  
+  return TRUE;
 }
 
 /* EOF */

reactos/subsys/win32k/dib
dib32bpp.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- dib32bpp.c	6 Apr 2004 17:54:32 -0000	1.19
+++ dib32bpp.c	6 Apr 2004 21:53:48 -0000	1.20
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib32bpp.c,v 1.19 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: dib32bpp.c,v 1.20 2004/04/06 21:53:48 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -572,12 +572,11 @@
                          RECTL*  DestRect,  POINTL  *SourcePoint,
                          XLATEOBJ *ColorTranslation, ULONG iTransColor)
 {
-  ULONG X, Y;
-  ULONG SourceX, SourceY, Source, wd;
-  PULONG DestBits;
+  ULONG X, Y, SourceX, SourceY, Source, wd;
+  ULONG *DestBits;
   
   SourceY = SourcePoint->y;
-  DestBits = (PULONG)(DestSurf->pvScan0 +
+  DestBits = (ULONG*)(DestSurf->pvScan0 +
                       (DestRect->left << 2) +
                       DestRect->top * DestSurf->lDelta);
   wd = ((DestRect->right - DestRect->left) << 2) - DestSurf->lDelta;
@@ -587,21 +586,15 @@
     SourceX = SourcePoint->x;
     for(X = DestRect->left; X < DestRect->right; X++, DestBits++, SourceX++)
     {
-      Source = DIB_GetOriginalSource(SourceSurf, SourceGDI, SourceX, SourceY);
-      if(Source == iTransColor)
+      Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX, SourceY);
+      if(Source != iTransColor)
       {
-        /* Skip transparent pixels */
-        continue;
-      }
-      
-      if(ColorTranslation)
         *DestBits = XLATEOBJ_iXlate(ColorTranslation, Source);
-      else
-        *DestBits = Source;
+      }
     }
     
     SourceY++;
-    DestBits = (PULONG)((ULONG_PTR)DestBits - wd);
+    DestBits = (ULONG*)((ULONG_PTR)DestBits - wd);
   }
   
   return TRUE;

reactos/subsys/win32k/eng
bitblt.c 1.44 -> 1.45
diff -u -r1.44 -r1.45
--- bitblt.c	5 Apr 2004 21:26:24 -0000	1.44
+++ bitblt.c	6 Apr 2004 21:53:48 -0000	1.45
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: bitblt.c,v 1.44 2004/04/05 21:26:24 navaraf Exp $
+/* $Id: bitblt.c,v 1.45 2004/04/06 21:53:48 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -46,8 +46,6 @@
 #define NDEBUG
 #include <win32k/debug1.h>
 
-#define ROP_NOOP 0x00AA0029
-
 typedef BOOLEAN STDCALL (*PBLTRECTFUNC)(SURFOBJ* OutputObj,
                                         SURFGDI* OutputGDI,
                                         SURFOBJ* InputObj,

reactos/subsys/win32k/eng
gradient.c 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- gradient.c	21 Mar 2004 10:18:33 -0000	1.6
+++ gradient.c	6 Apr 2004 21:53:48 -0000	1.7
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: gradient.c,v 1.6 2004/03/21 10:18:33 weiden Exp $
+/* $Id: gradient.c,v 1.7 2004/04/06 21:53:48 weiden Exp $
  * 
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -30,6 +30,7 @@
 #include <ddk/winddi.h>
 #include <ddk/ntddmou.h>
 #include <include/eng.h>
+#include <include/inteng.h>
 #include <include/object.h>
 #include <include/paint.h>
 #include <include/surface.h>
@@ -570,13 +571,13 @@
     {
       IntLockGDIDriver(SurfGDI);
       SurfGDI->BitBlt(psoDest, NULL, NULL, pco, pxlo,
-                      prclExtents, pptlDitherOrg, NULL, NULL, NULL, 0x00AA0029);
+                      prclExtents, pptlDitherOrg, NULL, NULL, NULL, ROP_NOOP);
       IntUnLockGDIDriver(SurfGDI);
       MouseSafetyOnDrawEnd(psoDest, SurfGDI);
       return TRUE;
     }
     EngBitBlt(psoDest, NULL, NULL, pco, pxlo,
-              prclExtents, pptlDitherOrg, NULL, NULL, NULL, 0x00AA0029);
+              prclExtents, pptlDitherOrg, NULL, NULL, NULL, ROP_NOOP);
   }
   MouseSafetyOnDrawEnd(psoDest, SurfGDI);
   return Ret;

reactos/subsys/win32k/eng
transblt.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- transblt.c	6 Apr 2004 17:54:32 -0000	1.14
+++ transblt.c	6 Apr 2004 21:53:48 -0000	1.15
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: transblt.c,v 1.14 2004/04/06 17:54:32 weiden Exp $
+/* $Id: transblt.c,v 1.15 2004/04/06 21:53:48 weiden Exp $
  * 
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -152,7 +152,7 @@
       Pt.x = InputPoint.x + CombinedRect.left - OutputRect.left;
       Pt.y = InputPoint.y + CombinedRect.top - OutputRect.top;
       Ret = OutputGDI->DIB_TransparentBlt(OutputObj, InputObj, OutputGDI, InputGDI, &CombinedRect, 
-                                         &Pt, ColorTranslation, iTransColor);
+                                          &Pt, ColorTranslation, iTransColor);
       break;
     }
     case DC_COMPLEX:
@@ -285,6 +285,22 @@
                             SourceRect, iTransColor, Reserved);
   }
   
+  if(Ret)
+  {
+    /* Dummy BitBlt to let driver know that something has changed.
+       0x00AA0029 is the Rop for D (no-op) */
+    if(SurfGDIDest->BitBlt)
+    {
+      IntLockGDIDriver(SurfGDIDest);
+      SurfGDIDest->BitBlt(Dest, NULL, NULL, Clip, ColorTranslation,
+                          &OutputRect, NULL, NULL, NULL, NULL, ROP_NOOP);
+      IntUnLockGDIDriver(SurfGDIDest);
+    }
+    else
+      EngBitBlt(Dest, NULL, NULL, Clip, ColorTranslation,
+                &OutputRect, NULL, NULL, NULL, NULL, ROP_NOOP);
+  }
+  
   MouseSafetyOnDrawEnd(Dest, SurfGDIDest);
   if(Source != Dest)
   {

reactos/subsys/win32k/include
inteng.h 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- inteng.h	6 Apr 2004 17:54:32 -0000	1.11
+++ inteng.h	6 Apr 2004 21:53:48 -0000	1.12
@@ -1,6 +1,8 @@
 #ifndef _WIN32K_INTENG_H
 #define _WIN32K_INTENG_H
 
+#define ROP_NOOP	0x00AA0029
+
 /* Definitions of IntEngXxx functions */
 
 BOOL STDCALL IntEngLineTo(SURFOBJ *Surface,
CVSspam 0.2.8