Author: tkreuzer
Date: Tue May 24 16:23:36 2011
New Revision: 51886

URL: http://svn.reactos.org/svn/reactos?rev=51886&view=rev
Log:
[WIN32K]
- Add a comment about alignment for GreCreateBitmap
- Make bits really 32bit aligned
- Remove unused variable

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
    trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c?rev=51886&r1=51885&r2=51886&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] Tue May 
24 16:23:36 2011
@@ -92,9 +92,9 @@
   HANDLE  hPowerRequestEvent,
   HANDLE  hMediaRequestEvent)
 {
-    static const WORD wPattern55AA[] =
-    { 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0,
-      0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 };
+    static const DWORD wPattern55AA[] = /* 32 bit aligned */
+    { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa,
+      0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa };
     HBITMAP hPattern55AABitmap = NULL;
     NTSTATUS Status;
 

Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c?rev=51886&r1=51885&r2=51886&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue 
May 24 16:23:36 2011
@@ -80,7 +80,6 @@
        IN FLONG flags)
 {
     PSURFACE psurf;
-    SURFOBJ *pso;
     HBITMAP hbmp;
 
     /* Verify format */
@@ -94,9 +93,8 @@
         return NULL;
     }
 
-    /* Get the handle for the bitmap and the surfobj */
+    /* Get the handle for the bitmap */
     hbmp = (HBITMAP)psurf->SurfObj.hsurf;
-    pso = &psurf->SurfObj;
 
     /* The infamous RLE hack */
     if (iFormat == BMF_4RLE || iFormat == BMF_8RLE)
@@ -144,6 +142,7 @@
 
 /* Creates a DDB surface,
  * as in CreateCompatibleBitmap or CreateBitmap.
+ * Note that each scanline must be 32bit aligned!
  */
 HBITMAP
 APIENTRY


Reply via email to