Commit graph

189 commits

Author SHA1 Message Date
Timo Kreuzer 8af88571ea sync with trunk (r49238)
svn path=/branches/reactos-yarotows/; revision=49240
2010-10-23 16:42:45 +00:00
Jérôme Gardou d6686bcbb1 Sync with trunk head (r49139)
svn path=/branches/reactos-yarotows/; revision=49142
2010-10-14 14:23:50 +00:00
Kamil Hornicek 8dec037a81 [WIN32K]
UserEnumDisplaySettings returns NTSTATUS.

svn path=/branches/reactos-yarotows/; revision=49118
2010-10-11 15:56:46 +00:00
Timo Kreuzer 2755820d64 Sync with trunk head (r48786)
svn path=/branches/reactos-yarotows/; revision=48787
2010-09-17 16:17:17 +00:00
Timo Kreuzer becce266ec [WIN32K]
- Remove some obsolete casts

svn path=/branches/reactos-yarotows/; revision=48782
2010-09-16 19:26:12 +00:00
Jérôme Gardou 1a45c42898 [WIN32K]
- Do not acccess unsafe bits outside of PSEH

svn path=/branches/reactos-yarotows/; revision=48685
2010-09-01 22:36:00 +00:00
Jérôme Gardou a87737f098 [WIN32K]
- always make icon mask bitmap a global object

svn path=/branches/reactos-yarotows/; revision=48684
2010-09-01 20:06:46 +00:00
Jérôme Gardou 33b51fcec4 [WIN32K]
- Do not access unsafe buffer out of PSEH.

svn path=/branches/reactos-yarotows/; revision=48683
2010-09-01 19:54:45 +00:00
Jérôme Gardou 66fd97f171 [WIN32K]
- same as 48681 for win32k

svn path=/branches/reactos-yarotows/; revision=48682
2010-09-01 18:39:37 +00:00
Jérôme Gardou b0fe5ee433 [WIN32K]
- Use newly introduced macros and get rid of  related functions
  - Ignore alpha channels of solid brush color

svn path=/branches/reactos-yarotows/; revision=48680
2010-09-01 16:52:23 +00:00
Timo Kreuzer 61c05f8d3d Add macros WIDTH_BYTES_ALIGN16/32
svn path=/branches/reactos-yarotows/; revision=48675
2010-09-01 12:04:31 +00:00
Jérôme Gardou ce75f117fd [WIN32K]
- Giannis Adamopoulos : "Something is missing here"

svn path=/branches/reactos-yarotows/; revision=48674
2010-09-01 11:28:50 +00:00
Jérôme Gardou 00b7f54d2e [WIN32K]
- Get rid of old code, when surfaces didn't have palettes by default

svn path=/branches/reactos-yarotows/; revision=48670
2010-08-31 20:38:49 +00:00
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