[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 1 May 2012 13:57:18 +0000 (13:57 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 1 May 2012 13:57:18 +0000 (13:57 +0000)
- Fix RLE hack (thanks to Mephisto)
- Remove obsolete flags

svn path=/trunk/; revision=56464

reactos/win32ss/gdi/eng/surface.c
reactos/win32ss/gdi/eng/surface.h
reactos/win32ss/gdi/ntgdi/bitblt.c
reactos/win32ss/gdi/ntgdi/bitmaps.c
reactos/win32ss/gdi/ntgdi/dibobj.c

index 954002d..2fb1c03 100644 (file)
@@ -143,8 +143,6 @@ SURFACE_AllocSurface(
     PVOID pvSection;
 
     ASSERT(!pvBits || (iType == STYPE_BITMAP));
-    ASSERT(pvBits || !(fjBitmap & BMF_DONT_FREE));
-    ASSERT(!pvBits || !(fjBitmap & BMF_SINGLEALLOC));
 
     /* Verify format */
     if ((iFormat < BMF_1BPP) || (iFormat > BMF_PNG))
index d72f576..550a681 100644 (file)
@@ -80,11 +80,7 @@ typedef struct _SURFACE
 #define ABORT_SURFACE             0x40000000
 #define PDEV_SURFACE              0x80000000
 
-
-#define BMF_DONT_FREE 0x100
-#define BMF_RLE_HACK  0x200
-#define BMF_SINGLEALLOC 0x400
-#define BMF_POOLALLOC 0x800
+#define BMF_POOLALLOC 0x100
 
 /*  Internal interface  */
 
index 695efaa..43c8400 100644 (file)
@@ -1164,7 +1164,7 @@ NtGdiGetPixel(
                                      1,
                                      1,
                                      BMF_32BPP,
-                                     BMF_DONT_FREE,
+                                     0,
                                      0,
                                      &ulRGBColor);
     if (psurfDest)
index 5308c4c..8c2065d 100644 (file)
@@ -84,7 +84,7 @@ GreCreateBitmapEx(
     }
 
     /* The infamous RLE hack */
-    if ((iFormat == BMF_4RLE) || (iFormat == BMF_8RLE))
+    if (pvCompressedBits)
     {
         SIZEL sizl;
         LONG lDelta;
@@ -95,7 +95,6 @@ GreCreateBitmapEx(
 
         pvBits = psurf->SurfObj.pvBits;
         DecompressBitmap(sizl, pvCompressedBits, pvBits, lDelta, iFormat);
-        psurf->SurfObj.fjBitmap |= BMF_RLE_HACK;
     }
 
     /* Get the handle for the bitmap */
index fe029c2..014141a 100644 (file)
@@ -1595,7 +1595,6 @@ DIB_CreateDIBSection(
     bmp->dwOffset = offset;
     bmp->flags = API_BITMAP;
     bmp->biClrImportant = bi->biClrImportant;
-    bmp->SurfObj.fjBitmap &= ~BMF_DONT_FREE;
 
     /* HACK */
     if(hpal != (HPALETTE)0xFFFFFFFF)