Commit graph

16 commits

Author SHA1 Message Date
Jérôme Gardou 5cfcef35dc [WIN32K]
- 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
2010-07-29 16:12:43 +00:00
Jérôme Gardou fbcac4b275 [WIN32K]
- 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
2010-07-25 11:35:45 +00:00
Timo Kreuzer f8a49f4c75 [WIN32K]
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
2010-06-07 15:55:03 +00:00
Timo Kreuzer a3214996fc [WIN32K]
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
2010-06-06 22:01:41 +00:00
Timo Kreuzer 160142322e [WIN32K]
Make the SURFACE structure a bit more like the half documented windows version.

svn path=/branches/reactos-yarotows/; revision=47603
2010-06-05 21:19:41 +00:00
Timo Kreuzer 7b31d4395d [WIN32K]
Add back a break that got removed by accident. Fixes icon color regression.

svn path=/branches/reactos-yarotows/; revision=47270
2010-05-19 02:36:38 +00:00
Jérôme Gardou b0aa4f5a2c [WIN32K]
- 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
2010-05-14 20:19:46 +00:00
Jérôme Gardou 10e3e81202 [WIN32K]
- 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
2010-05-14 18:51:48 +00:00
Jérôme Gardou 421a63ff44 [WIN32K]
- Get rid of hDIBPalette in SURFACE structure
This allows more code cleanness

svn path=/branches/reactos-yarotows/; revision=47190
2010-05-12 22:56:24 +00:00
Jérôme Gardou 38a2853dc1 [WIN32K]
- 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
2010-05-09 13:07:47 +00:00
Jérôme Gardou c3f13756b2 [WIN32K]
- Set NULL owner to copied bitmap when creating indirect icons
  - Rewrite UserDrawIconEx, inspired from wine code
  - fix palette creation for 16 bits DIB
  - Always assign a palette to bitmap created with BITMAP_CopyBitmap and IntCreateCompatibeBitmap.
[USER32]
  - Use DIB section when creating icons
  - Use something called "header"
Now mode switching is almost glitchless.

svn path=/branches/reactos-yarotows/; revision=47140
2010-05-09 11:35:36 +00:00
Jérôme Gardou db93f2d307 [WIN32K]
- 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
2010-05-08 22:10:41 +00:00
Jérôme Gardou 88c9e7c6e8 Sync with trunk (r47116), hopefully without breaking anything.
svn path=/branches/reactos-yarotows/; revision=47117
2010-05-07 07:41:13 +00:00
Jérôme Gardou ef35c1e75c [WIN32K]
- Use the attached surface bits depth when creating a compatible DC
[USER32]
  - use a display DC for loading images

svn path=/branches/reactos-yarotows/; revision=46981
2010-04-21 15:52:52 +00:00
Timo Kreuzer 74ef03da5c Commit the stuff. Lots of changes. I'll write a proper list of changes when it's done.
svn path=/branches/reactos-yarotows/; revision=45355
2010-01-30 21:12:42 +00:00
Timo Kreuzer 6afbc8f483 Hopefully create a branch and not destroy the svn repository.
svn path=/branches/reactos-yarotows/; revision=45219
2010-01-23 23:25:04 +00:00
Renamed from reactos/subsystems/win32/win32k/objects/bitmaps.c (Browse further)