[ros-diffs] [greatlrd] 33783: revert my last change 1. it break vmware drv, for it align each bitmap row it create 2. diffent behoirs in diffent vm this did show we have more serius bug to fix before we can apply correct fix.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sat May 31 14:17:25 CEST 2008


Author: greatlrd
Date: Sat May 31 07:17:25 2008
New Revision: 33783

URL: http://svn.reactos.org/svn/reactos?rev=33783&view=rev
Log:
revert my last change 
1. it break vmware drv, for it align each bitmap row it create
2. diffent behoirs in diffent vm
this did show we have more serius bug to fix before we can apply correct fix.

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/dibobj.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dibobj.c?rev=33783&r1=33782&r2=33783&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Sat May 31 07:17:25 2008
@@ -665,9 +665,7 @@
             }
             else
             {
-
                 ScanLines = min(ScanLines, BitmapObj->SurfObj.sizlBitmap.cy - StartScan);
-                
                 DestSize.cx = BitmapObj->SurfObj.sizlBitmap.cx;
                 DestSize.cy = ScanLines;
 
@@ -688,9 +686,9 @@
 
                 if (Info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
                 {
-
                     hDestBitmap = EngCreateBitmap(DestSize,
-                                                  DIB_GetDIBWidthBytes(DestSize.cx, Info->bmiHeader.biBitCount),
+                                                  /* DIB_GetDIBWidthBytes(DestSize.cx, Info->bmiHeader.biBitCount), */
+                                                  DestSize.cx * (Info->bmiHeader.biBitCount >> 3), /* HACK */
                                                   BitmapFormat(Info->bmiHeader.biBitCount, Info->bmiHeader.biCompression),
                                                   0 < Info->bmiHeader.biHeight ? 0 : BMF_TOPDOWN,
                                                   Bits);
@@ -1220,12 +1218,7 @@
  */
 INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth)
 {
-    /* http://www.osronline.com/DDKx/graphics/gdifncs_9pgn.htm say it must be exacly 
-     * number of byte to next scanline in the bitmap
-     */
-    UINT bytes = ((UINT)(abs(width)) * (UINT)depth) >> 3;
-    // FIXME : this is wrong return (width * depth + 31) & ~31) >> 3;
-    return (INT)bytes;
+  return ((width * depth + 31) & ~31) >> 3;
 }
 
 /***********************************************************************



More information about the Ros-diffs mailing list