- Did you know that we should ignore alpha channel of pattern in ROPs? You didn't, I didn't, now we do.
[WIN32K]
- Use BGR palette as default for 24 and 32 bpp bitmaps.
svn path=/branches/reactos-yarotows/; revision=48470
- Do not cast RGBQUAD to PALETTEENTRY or the other way around, you idiot.
- Report success even when we're asked fo 0 ScanLines in NtGdiGetDIBitsInternal.
svn path=/branches/reactos-yarotows/; revision=48417
- NtGdiGetBitmapBits : Bits we're given are 16 bits aligned.
- NtGdiGetDIBitsInternal : we must not stretch, for this there is NtGdiStretchDIBitsInternal. Use lower level functions to do the work, there is no need to create HDCs etc...
Now icons are back.
svn path=/branches/reactos-yarotows/; revision=48416
- Use correct offset in UserLoadImage, create the bitmap using display DC.
- BITMAP_GetObject : Report BI_BITFIELDS compression when we should.
- Use a 0 compatible DC when none is given in NtGdiCreateDIBitmapInternal.
This fixes some wine tests. Enjoy.
svn path=/branches/reactos-yarotows/; revision=48415
- 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
- Revert unwanted change and get back to PAL_BGR for default DIB palette mode.
Now yarotows looks like an OS again.
svn path=/branches/reactos-yarotows/; revision=48390
- 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
- Cast Colors to RGBQUAD in EngCreateBitmap, since that's what they are.
- Copy selected palette of the DC when creating a DIBSection with DIB_PAL_COLORS.
- Do not try to get Colors in NtGdiGetDIBitsInternal when bpp == 0, this doesn't make any sense.
- Get rid of SURFACE::dsBitfields and SURFACE::biClrUsed.
- Use RGB as default palette mod when creating the DIB Palette.
svn path=/branches/reactos-yarotows/; revision=48369
- rewrite UserLoadImage so that it uses information from the BITMAPFILEHEADER and probes the right buffer.
svn path=/branches/reactos-yarotows/; revision=48364
- Rewrite NtGdiGetDIBitsInternal, with WINE as a reference.
- Get back DIB Section creation to classic BITMAPINFO.
This si the beginnig of the end for all this BITMAPV5INFO stuff.
It is horrible, BITMAPCOREINFO->BITMAPINFO is already made in user mode, and V4 and V5 features are not used so often.
svn path=/branches/reactos-yarotows/; revision=48359
- More BITMAPINFO->BITMAPV5INFO
- Do not use PAL_BITFIELDS when creating the DIB palette and we know that it's RGB
- PSEH-ize NtGdiCreateDIBSection
svn path=/branches/reactos-yarotows/; revision=48248
- DIB data is not mandatory in CreateDIBitmap
[WIN32K]
- Simplify GreCreateDIBitmap
- Surface data should be 16 bits aligned
svn path=/branches/reactos-yarotows/; revision=47735
- Split NtGdiCreateDIBitmapInternal with its Gre Counterpart
- Set bV5ImageSize if it was not already set
- Probe bits we're given in NtGdiSetDIBits
- SEHize clipboard image data access
svn path=/branches/reactos-yarotows/; revision=47733
- check for the type of the DC to restore to decide whether we should restore the surface
Fixes yarotows specific FF3 bug
svn path=/branches/reactos-yarotows/; revision=47731
- Improve readability in SetBMIColor
- Only when BitCount is <= 8, calculate the number of colors in the table
- Fixes a crash with VBox driver
svn path=/branches/reactos-yarotows/; revision=47724
If pbmiSrc->bmiHeader.bV5ClrUsed is 0, calculate the number of colors from the bit depth. Fixes black taskbar icons with vbox driver on 8 bpp
svn path=/branches/reactos-yarotows/; revision=47719
Small bug big effects: Use the correct offset when copying the BITMAPINFO, fixes taskbar icons regression.
svn path=/branches/reactos-yarotows/; revision=47709
- Initialize the palettes before creating any bitmaps.
- Replace SURFACE_vSetDefaultPalette with an array of default palettes.
- Check iFormat in SURFACE_AllocSurface
svn path=/branches/reactos-yarotows/; revision=47703
- More BITMAPV5INFO fun
- Probe max size we are asked for when converting to V5 Info
[USER32] [WIN32K]
- CreateDIBitmap : Move safety handling to win32k, where it belongs. More code cleanness!
svn path=/branches/reactos-yarotows/; revision=47701
NtGdiGetDIBitsInternal: don't use the unsafe usermode pointer after the BITMAPINFO has been converted and protect writing back the result with SEH.
svn path=/branches/reactos-yarotows/; revision=47692
- remove duplicate prototypes.
- Add missing trail to debug print
- replace some now superfluous checks on bitmap palette with sanity ASSERTS
- begin using BITMAPV5HEADER as a default bitmap format, and introduce conversion to and from everything prior that.
Congratulations to BITMAPCOREHEADER, for its backward compatibility personal failure.
svn path=/branches/reactos-yarotows/; revision=47690
Introduce GreCreateBitmapEx, which has the extended functionality needed by some callers, GreCreateBitmap calls GreCreateBitmapEx to keep the simple syntax. Use it in DIB_CreateDIBSection to fix build. Also pass the size of the image (still ignored), which is needed for compressed bitmaps (we currently assume that RLEs take as much space as an uncompressed bitmap)
svn path=/branches/reactos-yarotows/; revision=47663
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
Make the bitmap data for the extpens (making extpens bitmaps is a bad idea anyway) 4 bytes long instead of 3, to fulfill alignment requirements.
svn path=/branches/reactos-yarotows/; revision=47638
- clean up some debugging code
- set NULL owner when setting BASEFLAG_READY_TO_DIE, so that the handle can be freed.
svn path=/branches/reactos-yarotows/; revision=47217
- clean up some unused code
- use GDIOBJ_IncrementShareCount on Timo suggestion
- use ppdev semaphore as sort criterion in DC_vPrepareDCsForBlit, spotted by Timo
- Get ownership before freeing the object in GDIOBJ_ShareUnlockObjByPtr, as whoever set it ready to die had the right to
svn path=/branches/reactos-yarotows/; revision=47205
- IntGdiCreateBitmap : assign a default palette to the bitmap created
- Use IntCreateBitmap where we already have a bitmap to assign
- delete all mono bitmaps related hacks in xlateobj implementation, as now all bitmaps should have a palette
Fixes last immediately visible glitches when switching modes
svn path=/branches/reactos-yarotows/; revision=47203
- remove a comment which is not true anymore
[USER32]
- Create a bitmap which is compatible with the bitmap'we are copying in CreateSmallIcon
Icons are back in taskbar
svn path=/branches/reactos-yarotows/; revision=47143