[ros-diffs] [jimtabor] 50987: [GDI32] - Remove the old SetDIBBits, it severed us well.... Hold on to the win32k call. - Tested, Area.exe, wine gdi32 bitmaps test, AbiWord 2.8.6, OOo 2.4.3, SM 2.0.11 and ReactO...

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Mar 7 07:24:43 UTC 2011


Author: jimtabor
Date: Mon Mar  7 07:24:43 2011
New Revision: 50987

URL: http://svn.reactos.org/svn/reactos?rev=50987&view=rev
Log:
[GDI32]
- Remove the old SetDIBBits, it severed us well.... Hold on to the win32k call.
- Tested, Area.exe, wine gdi32 bitmaps test, AbiWord 2.8.6, OOo 2.4.3, SM 2.0.11 and ReactOS applications.
- Aimp 2.61.583 (FULL, pinted okay), CoolPlayer 219, winamp 0.98d and winamp 2.95 (not FUll). The rest have drawing issue with DIB. See bug 5886.

Modified:
    trunk/reactos/dll/win32/gdi32/objects/bitmap.c

Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bitmap.c?rev=50987&r1=50986&r2=50987&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Mon Mar  7 07:24:43 2011
@@ -531,7 +531,6 @@
     return hBmp;
 }
 
-#if 0 // FIXME!!! This is a victim of the Win32k Initialization BUG!!!!!
 /*
  * @implemented
  */
@@ -621,60 +620,6 @@
     else
         RestoreDC(SavehDC, -1);
 
-    return LinesCopied;
-}
-#endif
-
-INT
-WINAPI
-SetDIBits(HDC hdc,
-          HBITMAP hbmp,
-          UINT uStartScan,
-          UINT cScanLines,
-          CONST VOID *lpvBits,
-          CONST BITMAPINFO *lpbmi,
-          UINT fuColorUse)
-{
-    PBITMAPINFO pConvertedInfo;
-    UINT ConvertedInfoSize;
-    INT LinesCopied = 0;
-    UINT cjBmpScanSize = 0;
-    PVOID pvSafeBits = (PVOID)lpvBits;
-
-// This needs to be almost the sames as SetDIBitsToDevice
-
-    if ( !cScanLines || !lpbmi || !lpvBits || (GDI_HANDLE_GET_TYPE(hbmp) != GDI_OBJECT_TYPE_BITMAP))
-        return 0;
-
-    if ( fuColorUse && fuColorUse != DIB_PAL_COLORS && fuColorUse != DIB_PAL_COLORS+1 )
-        return 0;
-
-    pConvertedInfo = ConvertBitmapInfo(lpbmi, fuColorUse,
-                                       &ConvertedInfoSize, FALSE);
-    if (!pConvertedInfo)
-        return 0;
-
-    cjBmpScanSize = DIB_BitmapMaxBitsSize((LPBITMAPINFO)lpbmi, cScanLines);
-
-    if ( lpvBits )
-    {
-        pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize);
-        if (pvSafeBits)
-            RtlCopyMemory( pvSafeBits, lpvBits, cjBmpScanSize);
-    }
-
-    LinesCopied = NtGdiSetDIBits( hdc,
-                                  hbmp,
-                                  uStartScan,
-                                  cScanLines,
-                                  pvSafeBits,
-                                  pConvertedInfo,
-                                  fuColorUse);
-
-    if ( lpvBits != pvSafeBits)
-        RtlFreeHeap(RtlGetProcessHeap(), 0, pvSafeBits);
-    if (lpbmi != pConvertedInfo)
-        RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
     return LinesCopied;
 }
 




More information about the Ros-diffs mailing list