[ros-kernel] CreateCompatibleBitmap patch (fixes bug 244)

Andrew Greenwood lists at silverblade.co.uk
Tue Mar 9 23:47:38 CET 2004


Hopefully this patch will fix the CreateCompatibleBitmap uninitialized
bitmap bug.

I haven't experienced it myself, and am not sure if this solution is
correct, or the most efficient, however, so I'm submitting this patch for
review before committing it.

Please confirm that this patch works as intended and doesn't break anything.


BUG #244 OVERVIEW:
CreateComatibleBitmap should initialize the bitmap with the background
color.
Currently there is the bitmap not initialized and drawing to the screen
shows
random colors.

RESOLUTION:
Fill the bitmap with zeroes.

CODE: (for NtGdiCreateBitmap of win32k.sys)
int Pixel;
   for (Pixel = 0; Pixel < Height * bmp->bitmap.bmWidthBytes; Pixel ++)
  {
    ((char*)Bits)[Pixel] = 0;
  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CreateCompatibleBitmap.patch
Type: application/octet-stream
Size: 878 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-kernel/attachments/20040309/6983b24a/CreateCompatibleBitmap-0001.obj


More information about the Ros-kernel mailing list