- 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
- 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
- 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
- Move RLE specific code to it's own file (rlecomp.c)
- Relace BitsPerFormat function with an array of UCHARs
- Rewrite surface creation. Surfaces are now allocated from one central function SURFACE_AllocSurface, which sets the size, iType, iUniq, the handle and the default palette.
- Implement SURFACE_vSetDefaultPalette, which sets the default RGB palette, based on bit depth.
- Implement SURFACE_bSetBitmapBits, wich sets cjBits, pvBits, pvScan0 and lDelta and allocates memory if neccessary.
- Use these functions for EngCreateBitmap, EngCreateDeviceBitmap, EngCreateDeviceSurface and IntCreateBitmap
svn path=/branches/reactos-yarotows/; revision=47612
- Allocate bitmaps as kernel sections, instead of from paged pool, like it's done in windows.
- Fix SURFACE_Cleanup. It was only freeing the memory for API_BITMAPs. If memory was allocated by a driver it never got freed.
- Add BMF_RLE_HACK flag to free decompressed RLE bits
- Support FL_ZERO_MEMORY in EngAllocSectionMem
- Set SURFOBJ::iType when creating a surface
svn path=/branches/reactos-yarotows/; revision=47606
- 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
- attach devinfo->hpalDefault to the pdevobj after enabling it
- attach this palette to surfaces attached to this pdevobj through EngModifySurface
- use this palette in several place
Partially fixes icon drawing after mode switch
svn path=/branches/reactos-yarotows/; revision=47137
- Update direct DCs surface before blit if needed
- call directly ppdev in MouseSafetyOnDraw{Start,End}
- use directly the PDEVOBJ surface in mouse operations
- Add some mouse-related sanity checks
svn path=/branches/reactos-yarotows/; revision=46937
- For now, limit DC_UnlockDc to a simple GDIOBJ_LockObj
- More GDIOBJ_LockMultipleObj, DC_vPrepareDCsForBlit and DC_vFinishBlit fun
svn path=/branches/reactos-yarotows/; revision=46906
- Introduce DC_vPrepareDCsForBlit and DC_vFinishBlit and use them in NtGdiAlphaBlend
- Get rid of now unnecessary call for MouseSafetyOnDraw{Start,End} in IntEngAlphaBlend
- Yet Another Rewrite of GDIOBJ_LockMultipleObjs :-/ and use it in NtGdiAlphaBlend
svn path=/branches/reactos-yarotows/; revision=46902
- Introduce deadlocks killer GDIOBJ_LockMultipleObjs, unused for now
- Make the PDEVOBJ DCs list a sorted list
Didicated to Physicus
svn path=/branches/reactos-yarotows/; revision=46891
-Make direct DC release shared lock on surface each time they're unlocked.
-Now they don't hold it unless they're locked themselves.
-Do not create the device surface when switching modes, this is inconsistent with the PDEVOBJ creation, which does not.
*No more "you are freeing a surface which is still hold" debug message when switching modes*
svn path=/branches/reactos-yarotows/; revision=46733
- EngAcquireSemaphoreShared: update dwEngAcquireCount
- DC_LockDc/DC_UnlockDc: Acquire PDEV lock only for direct DCs, in that case also update the pSurface pointer
- When copying DC states, copy the surface only for memory dcs
- after switching the mode, update system metrics and redraw the desktop window.
- Remove testdraw code.
svn path=/branches/reactos-yarotows/; revision=46658