Commit graph

176 commits

Author SHA1 Message Date
Jérôme Gardou 5ba0a60862 [WIN32K]
- Create the visible region upon DC initilization propely.
This is a leftover from 48579 and 48660.

svn path=/branches/reactos-yarotows/; revision=48665
2010-08-31 16:02:22 +00:00
Timo Kreuzer 0372821ca0 Sync with trunk head (r48654)
svn path=/branches/reactos-yarotows/; revision=48660
2010-08-30 19:55:47 +00:00
Jérôme Gardou 8fc627931b Revert parts of r48547 which have nothing to do with the sync
svn path=/branches/reactos-yarotows/; revision=48553
2010-08-15 14:51:39 +00:00
Jérôme Gardou f9862d34b4 Sync with trunk (r48545)
svn path=/branches/reactos-yarotows/; revision=48547
2010-08-14 15:15:44 +00:00
Jérôme Gardou d4933ee771 [WIN32K]
- I watch and I learn : / has precedence over *=.
  - Also make sure that we divide what we want to divide with the appropriate parentheses.
  - Do not take care of alpha in other depths than 32 bpp.

svn path=/branches/reactos-yarotows/; revision=48488
2010-08-08 16:20:24 +00:00
Timo Kreuzer 1784002600 [WIN32K]
Fix a bug when premultiplying the color values: The / operator has a higher precedence than *=, so "x *= byte / 0xff", is always 0 unless byte == 0xff.

svn path=/branches/reactos-yarotows/; revision=48485
2010-08-08 07:14:11 +00:00
Jérôme Gardou 4d4f541dae [WIN32K]
- work directly with bitmap bits when alpha blending icons. This is permitted, those are API bitmaps.
  - Do not create a stretched copy of source surface in EngAlphaBlend, handle stretching in DIB functions.
  - Do so.
  - Simplify DIB alpha blending for 24 and 32 bpp, implement generic alpha blend support for other depth.

svn path=/branches/reactos-yarotows/; revision=48483
2010-08-08 00:08:39 +00:00
Jérôme Gardou 4e6c12189d revert xlate.c from 48471, never meant to be committed.
Sorry.

svn path=/branches/reactos-yarotows/; revision=48472
2010-08-06 22:09:38 +00:00
Jérôme Gardou e84aac6fb8 [WIN32K]
- sync with trunk (48469)

svn path=/branches/reactos-yarotows/; revision=48471
2010-08-06 21:33:37 +00:00
Jérôme Gardou b06db1f05e [WIN32K, GENDIB]
- 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
2010-08-06 14:55:44 +00:00
Jérôme Gardou 3f5d90a47a [WIN32K]
- Rewrite NtGdiStretchDIBitsInternal : clearer, faster, stronger (+1 wine test)

svn path=/branches/reactos-yarotows/; revision=48465
2010-08-05 21:12:57 +00:00
Jérôme Gardou 96444b43c2 Sync with trunk (48463)
svn path=/branches/reactos-yarotows/; revision=48464
2010-08-05 21:03:35 +00:00
Jérôme Gardou 5762f7b639 [WIN32K]
- Use lower level function to set bitmap bits in IntSetDIBits.
Fixes rapps icons.

svn path=/branches/reactos-yarotows/; revision=48420
2010-08-02 19:40:42 +00:00
Jérôme Gardou 52e83d06d9 Sync with trunk (r48414)
svn path=/branches/reactos-yarotows/; revision=48419
2010-08-02 19:09:21 +00:00
Jérôme Gardou f65f4b82ff [WIN32K]
- 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
2010-08-02 17:25:09 +00:00
Jérôme Gardou 4519685bb8 [WIN32K]
- 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
2010-08-02 16:49:51 +00:00
Jérôme Gardou 501947714e [WIN32K]
- 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
2010-08-02 14:45:51 +00:00
Jérôme Gardou 0bba315d06 [WIN32K]
- 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
2010-08-02 01:41:16 +00:00
Jérôme Gardou 53fe62ce9c [WIN32K]
- Colors passed to EngCreatePalette are PALETTEENTRYs, my bad.

svn path=/branches/reactos-yarotows/; revision=48407
2010-08-02 01:09:36 +00:00
Jérôme Gardou a0d32e2d0b [WIN32K]
- 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
2010-08-02 00:53:25 +00:00
Kamil Hornicek 7d7d9eba48 [WIN32K]
Comply with the 32 bit alignment rule. Fixes hatch brushes.

svn path=/branches/reactos-yarotows/; revision=48396
2010-08-01 13:29:22 +00:00
Jérôme Gardou c2a010f5f1 [WIN32K]
- 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
2010-08-01 12:24:04 +00:00
Jérôme Gardou 787cb5551f [WIN32K]
- 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
2010-08-01 12:17:35 +00:00
Jérôme Gardou 147e52c02c [WIN32K]
- 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
2010-07-30 02:15:46 +00:00
Jérôme Gardou b011aff53b [WIN32K]
- rewrite UserLoadImage so that it uses information from the BITMAPFILEHEADER and probes the right buffer.

svn path=/branches/reactos-yarotows/; revision=48364
2010-07-29 18:01:14 +00:00
Jérôme Gardou fa93ac8293 [WIN32K]
- Get rid of GetBMIFromBitmapV5Info

svn path=/branches/reactos-yarotows/; revision=48360
2010-07-29 16:21:02 +00:00
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
Jérôme Gardou eaa1cb5487 Sync with trunk (r48123)
svn path=/branches/reactos-yarotows/; revision=48145
2010-07-20 20:09:43 +00:00
Jérôme Gardou f819794d7d Sync with trunk 48067
svn path=/branches/reactos-yarotows/; revision=48068
2010-07-15 20:49:51 +00:00
Jérôme Gardou 84fd5d3369 Push sync to 48046, this time with cursoricon.c
svn path=/branches/reactos-yarotows/; revision=48049
2010-07-14 20:28:06 +00:00
Jérôme Gardou 1b3dfd946f Sync with trunk (r48042), except win32k/ntuser/cursoricon.c
***branch DOES NOT BUILD with this commit***

svn path=/branches/reactos-yarotows/; revision=48048
2010-07-14 20:15:30 +00:00
Jérôme Gardou 8de79262a5 [WIN32K]
- Remove useless chack and comment from UserDrawIconEx

svn path=/branches/reactos-yarotows/; revision=48027
2010-07-13 18:38:19 +00:00
Jérôme Gardou d25782346f [USER32]
- exchange mask and color bitmaps if needed in CreateIconIndirect
[WIN32K]
  - Simplify a bit UserDrawIconEx

svn path=/branches/reactos-yarotows/; revision=48026
2010-07-13 18:32:33 +00:00
Jérôme Gardou 4553986560 Sync with trunk (r48008)
Bets are open : will this break anything?

svn path=/branches/reactos-yarotows/; revision=48024
2010-07-13 17:46:03 +00:00
Timo Kreuzer e279aa2082 Sync to trunk (r47832)
svn path=/branches/reactos-yarotows/; revision=47833
2010-06-23 16:21:41 +00:00
Jérôme Gardou 3dbb216746 [WIN32K]
- apply r47787 to yarotows

svn path=/branches/reactos-yarotows/; revision=47797
2010-06-17 01:34:52 +00:00
Jérôme Gardou 648fe9cf65 [WIN32K]
- Delete useless file once and for all

svn path=/branches/reactos-yarotows/; revision=47796
2010-06-17 01:31:03 +00:00
Jérôme Gardou 2d0dd58947 Hopefully fail to break anything in the process of syncing with trunk (r47786)
svn path=/branches/reactos-yarotows/; revision=47795
2010-06-17 01:25:16 +00:00
Jérôme Gardou bb23cc5ca6 [WIN32K]
- revert part of -r47735, as it's not the good fix (tm)

svn path=/branches/reactos-yarotows/; revision=47789
2010-06-16 18:50:55 +00:00
Timo Kreuzer 5f2d67cb35 Sync to trunk head (r47736)
svn path=/branches/reactos-yarotows/; revision=47746
2010-06-10 20:57:03 +00:00
Jérôme Gardou f57bcb3e25 [GDI32]
- DIB data is not mandatory in CreateDIBitmap
[WIN32K]
  - Simplify GreCreateDIBitmap
  - Surface data should be 16 bits aligned

svn path=/branches/reactos-yarotows/; revision=47735
2010-06-10 14:32:05 +00:00
Jérôme Gardou 52ba1736b3 [WIN32K]
- 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
2010-06-10 11:36:20 +00:00
Jérôme Gardou 4b10742ca5 [WIN32K]
- 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
2010-06-10 00:40:09 +00:00
Timo Kreuzer a8ac489720 [WIN32K]
- 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
2010-06-09 20:36:04 +00:00
Timo Kreuzer 26a57a2a9f [WIN32K]
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
2010-06-09 18:08:23 +00:00
Timo Kreuzer 02588ba9c0 [WIN32K]
Small bug big effects: Use the correct offset when copying the BITMAPINFO, fixes taskbar icons regression.

svn path=/branches/reactos-yarotows/; revision=47709
2010-06-09 11:22:19 +00:00
Timo Kreuzer 8d819d4de1 [WIN32K]
- 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
2010-06-09 02:57:52 +00:00
Jérôme Gardou 974e9c0c41 [WIN32K]
- 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
2010-06-09 00:08:50 +00:00
Timo Kreuzer 70f1514bfd [WIN32K]
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
2010-06-08 02:27:28 +00:00