- Apply a better fix for correctly report 16 bits alignment for DDBs, and keep them 32 bits aligned as it should be.
- Reapply Pigglesworth patch, which was correct since mine was not.
Dedicated to tkreuzer, PigglesWorth and lassy, the three guys still on IRC to watch my commits at 3:30 AM.
svn path=/branches/reactos-yarotows/; revision=48408
- DDB are 16 bits aligned.
- Reset hdc field of the unselected bitmap.
- Lock it too, so it's not messed with when we unselect it.
- Move Pattern creation of IntGdiCreateDIBBrush to DIB_CreateDIBSection.
svn path=/branches/reactos-yarotows/; revision=48406
- Finally get rid of ProbeAndConvertToBitmapV5Info
- Rewrite renderBITMAPfromDIB, and a good bunch of DIB related functions accordingly.
- Rewrite BITMAP_CopyBitmap into something simpler.
- Use already existing DIB functions in IntGdiCreateDIBBrush
- Use DIB sections in NtGdiStretchDIBitsInternal and NtGdiSetDIBits.
- Use Bitmap hdc for NtGdiGetDIBitsInternal if there is one.
svn path=/branches/reactos-yarotows/; revision=48389
Rewrite the bitmap API. There were a lot of bugs. NtGdiCreateBitmap allowed a negative height, leading to either topdown or bottomup bitmaps, a behaviour that Windows doesn't have. The function copied the bitmap bits directly from the caller to the bitmap using RtlCopyMemory, ignoring different scanline length and direction (resulting in bitmaps being upside down), not SEH protected. This function (IntSetBitmapBits) is replaced by a better solution UnsafeSetBitmapBits, that takes these things into account. The name is chosen to give a hint that the function can/should be SEH protected. IntSetBitmapBits is still there, as its retarded behaviour is actually required in some places. There were also IntCreateBitmap and IntGdiCreateBitmap, now both being replaced by GreCreateBitmap. The code that set the palette is removed, as it's already done in SURFACE_AllocSurface, here gpalRGB is replaced with gpalBGR, fixing some inverted color issues. The alignment correction in SURFACE_bSetBitmapBits is reapplied, now that the callers are behaving as they are supposed to do.
svn path=/branches/reactos-yarotows/; revision=47641