Commit graph

68 commits

Author SHA1 Message Date
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
Timo Kreuzer 2755820d64 Sync with trunk head (r48786)
svn path=/branches/reactos-yarotows/; revision=48787
2010-09-17 16:17:17 +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
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 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 96444b43c2 Sync with trunk (48463)
svn path=/branches/reactos-yarotows/; revision=48464
2010-08-05 21:03:35 +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 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
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
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
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
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 dd95ec9a50 [WIN32K]
Disable the additional alignment code for now, it breaks selections (text / icons)

svn path=/branches/reactos-yarotows/; revision=47619
2010-06-06 11:11:30 +00:00
Timo Kreuzer b3317b3afb [WIN32K]
Add Windows compatible alignment code.

svn path=/branches/reactos-yarotows/; revision=47618
2010-06-06 09:09:04 +00:00
Timo Kreuzer 6068cac704 [WIN32K]
- 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
2010-06-06 07:02:15 +00:00
Timo Kreuzer ca7f8096ff [WIN32K]
Once again: Do not free the memory for the bitmap bits, when you have not allocated them.

svn path=/branches/reactos-yarotows/; revision=47611
2010-06-06 06:32:01 +00:00
Timo Kreuzer f705d5861b [WIN32K]
Add another failure check to EngAllocSectionMem

svn path=/branches/reactos-yarotows/; revision=47610
2010-06-06 05:47:31 +00:00
Timo Kreuzer 98f686c8fc [WIN32K]
Do not free the memory for the bitmap bits, when you have not allocated them. Fixes bugcheck with VBox driver.

svn path=/branches/reactos-yarotows/; revision=47609
2010-06-06 05:45:36 +00:00
Timo Kreuzer 0c60cdb311 [WIN32K]
- 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
2010-06-06 03:12:56 +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 d325826ccd [WIN32K]
- Simplify the logic of the mapping functions a bit, by using either FILEVIEW or ENGSECTION, not both.
- Set FILEVIEW::LastWriteTime

svn path=/branches/reactos-yarotows/; revision=47591
2010-06-05 15:58:01 +00:00
Timo Kreuzer ea194bb322 [WIN32K]
Implement EngCreateSection, EngMapSection, EngFreeSectionMem, EngAllocSectionMem, EngLoadModuleEx, EngLoadModule, EngLoadModuleForWrite, EngMapModule, EngFreeModule, EngMapFile, EngUnmapFile. Unused & untested.

svn path=/branches/reactos-yarotows/; revision=47583
2010-06-05 04:34:12 +00:00
Jérôme Gardou 84f025a5a4 [WIN32K]
- Set DISPLAY_DEVICE_PRIMARY_DEVICE to Graphics device object when creating the primary device object
  - switch state flags of the graphics device objects when switching mode
  - Only compare valid fields when searching for a device mode in a device object
  - implement CDS_TEST flag in NtUserSetDisplaySettings

svn path=/branches/reactos-yarotows/; revision=47353
2010-05-25 20:24:21 +00:00
Timo Kreuzer 57447bb7b6 [WIN32K]
- Simplify EBRUSHOBJ_vInit and EBRUSHOBJ_bRealizeBrush a bit more

svn path=/branches/reactos-yarotows/; revision=47304
2010-05-22 14:54:48 +00:00
Timo Kreuzer 1549a8532e [WIN32K]
Simplify EXLATEOBJ_vInitXlateFromDCs and remove EXLATEOBJ_vInitBrushXlate. Less code, more fun.

svn path=/branches/reactos-yarotows/; revision=47278
2010-05-19 16:23:33 +00:00
Timo Kreuzer ff39f59027 [WIN32K]
- When initializing the EXLATEOBJ to translate the solid brush color in EBRUSHOBJ_vSetSolidBrushColor, also pass the EBRUSHOBJs back color. This fixes wrong colors when the destination surface is mono (e.g. disabled buttons)

svn path=/branches/reactos-yarotows/; revision=47269
2010-05-19 01:54:43 +00:00
Jérôme Gardou 63b50165b2 sync with trunk r47227
svn path=/branches/reactos-yarotows/; revision=47228
2010-05-15 22:30:01 +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 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 3d533cb7a2 Sync with trunk r47129
svn path=/branches/reactos-yarotows/; revision=47133
2010-05-08 17:23:51 +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 56da974d0c [WIN32K]
- Assign a correct pdevmode to the pdevobj when creating it.

svn path=/branches/reactos-yarotows/; revision=47114
2010-05-06 11:46:48 +00:00
Jérôme Gardou 1b5e323072 [GDI32]
- Use device string when given one in IntCreateDIC
[WIN32K]
  - Exchange pdevmode when excahnging PDEVOBJ pointers
  - Update Globals gdi devcaps when switching mode if ppdev is the primary surface

svn path=/branches/reactos-yarotows/; revision=47044
2010-04-26 21:49:09 +00:00
Timo Kreuzer 2250e691f1 [WIN32K]
- move IntEngMovePointer code into GreMovePointer
- Delete the mouse cursor before mode switch, to force setting a new one after a mode switch. Fixes cursor artifacts after mode change.
- Update TODO.txt

svn path=/branches/reactos-yarotows/; revision=46976
2010-04-21 13:44:06 +00:00
Timo Kreuzer 634c608726 [WIN32K]
- Remove an ASSERT in DC_Cleanup
- Improve code in PDEVOBJ_vSwitchPdev (code shamelessly stolen from Jerome's earlier commit)
- Fix up GDIINFO in PDEVOBJ_bEnablePDEV instead of EngpCreatePDEV
- Update TODO.txt

svn path=/branches/reactos-yarotows/; revision=46975
2010-04-21 12:21:53 +00:00
Jérôme Gardou 0988b6c773 Grotesque mistake...
svn path=/branches/reactos-yarotows/; revision=46943
2010-04-19 16:04:59 +00:00
Jérôme Gardou 14be9f22bd [WIN32K]
- HW accelerated StretchBlt when possible in EngAlphaBlend

svn path=/branches/reactos-yarotows/; revision=46941
2010-04-19 15:15:17 +00:00
Jérôme Gardou 82ad88f1ab [WIN32K]
- Get rid of IntEngBitBltEx, it's Exness isn't needed anymore

svn path=/branches/reactos-yarotows/; revision=46940
2010-04-19 15:08:03 +00:00
Jérôme Gardou 75108218f7 [WIN32K]
- move mouse related ppdev locking to Gre* functions
Spotted by Physicus

svn path=/branches/reactos-yarotows/; revision=46939
2010-04-19 14:17:26 +00:00
Jérôme Gardou e918eb7c29 [WIN32K]
- 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
2010-04-19 13:52:37 +00:00
Jérôme Gardou 083f2b4f4a [WIN32K]
- Finally get rid of SURFACE::BitsLock

svn path=/branches/reactos-yarotows/; revision=46935
2010-04-19 00:56:25 +00:00