Commit graph

68 commits

Author SHA1 Message Date
Timo Kreuzer 3078dd3c10 sync with trunk (r47268)
svn path=/branches/reactos-yarotows/; revision=47271
2010-05-19 03:44:15 +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 a5aa252f47 [WIN32K]
- clean up some debugging code
  - set NULL owner when setting BASEFLAG_READY_TO_DIE, so that the handle can be freed.

svn path=/branches/reactos-yarotows/; revision=47217
2010-05-15 09:57:36 +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 0a68d5e2e4 [WIN32K]
- Allow NtGdiDeleteObjectApp to delete a permanent DC, as windows does it.
This is not exactly what windows does, but no one should use a DeletedDC'ed DC anyway.
Fixes "No! You Naughty Application" debug spam and some wine tests

svn path=/branches/reactos-yarotows/; revision=47131
2010-05-08 16:41:41 +00:00
Jérôme Gardou 9e7867ddde revert unwanted changes
svn path=/branches/reactos-yarotows/; revision=47120
2010-05-07 23:36:49 +00:00
Jérôme Gardou a7eaab78db some leftover from last sync : GDIDBG macros expect handles, not index
svn path=/branches/reactos-yarotows/; revision=47119
2010-05-07 23:33:11 +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
Timo Kreuzer 600a901153 [WIN32K]
- Call DC_vPrepareDCsForBlit in IntRectangle with device coordinates instead of in NtGdiRectangle with logical coordinates. Fixes updating mouse pointer.
- Update TODO.txt

svn path=/branches/reactos-yarotows/; revision=46986
2010-04-22 03:53:49 +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 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 bb632b9d29 [WIN32K]
- revert r46970, it does not work after all...
  - add missing trailing character in debug print

svn path=/branches/reactos-yarotows/; revision=46974
2010-04-21 09:24:15 +00:00
Jérôme Gardou 11483181a8 [WIN32K]
- Physicus : In theory the text brush should never be changed
So be it, it works anyway...

svn path=/branches/reactos-yarotows/; revision=46970
2010-04-20 22:26:03 +00:00
Jérôme Gardou d8020bbbe1 [WIN32K]
- revert unwanted change from r46964
  - Use MouseSafetyOnDrawStart/End in GreExtTextOutW when we already hold the blit lock

svn path=/branches/reactos-yarotows/; revision=46969
2010-04-20 22:20:55 +00:00
Jérôme Gardou 2f9569c2e5 [WIN32K]
- really update Text and BackGround brushes when asked to

svn path=/branches/reactos-yarotows/; revision=46966
2010-04-20 20:44:43 +00:00
Jérôme Gardou f2a22bfe7a [WIN32K]
- Update brushes at the good moment in different places

svn path=/branches/reactos-yarotows/; revision=46965
2010-04-20 20:23:15 +00:00
Jérôme Gardou 650b476440 [WIN32K]
- Revert r46960 : the correct way to go is to mark brushes as dirty and update them where needed
  - Do so in GreExtTextOutW, NtGdiBitBlt, NtGdiStrecthBltMask and IntPatBlt
  - Add a small hack to GreEstTextOutW so we hold the Blit lock when needed without too much pain.

svn path=/branches/reactos-yarotows/; revision=46964
2010-04-20 19:31:45 +00:00
Jérôme Gardou 75f07ae3b4 [WIN32K]
- Reinitialize EBRUSHOBJs instead of marking them as dirty when switching modes

svn path=/branches/reactos-yarotows/; revision=46960
2010-04-20 17:55:56 +00:00
Jérôme Gardou b1f448326a [WIN32K]
- update clipping, GraphicCaps, brush, pen, background and charset of the DC after a mode change

svn path=/branches/reactos-yarotows/; revision=46952
2010-04-19 22:51:40 +00:00
Jérôme Gardou 202a5fc5c7 [WIN32K]
- Do not access surface before holding ppdev Lock

svn path=/branches/reactos-yarotows/; revision=46951
2010-04-19 21:56:44 +00:00
Jérôme Gardou 8188ea3959 [WIN32K]
- Prepare DC for blit before initializing EBRUSHOBJ

svn path=/branches/reactos-yarotows/; revision=46950
2010-04-19 21:48:17 +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 75dff0cf6a [WIN32k]
- Don't hold the DC blit lock during the whole GreTextOutW function.

svn path=/branches/reactos-yarotows/; revision=46934
2010-04-19 00:51:32 +00:00
Jérôme Gardou ce0a7a6e3b [WIN32K]
- call DC_vPrepareDCsForBlit / DC_vFinishBlit in the right place

svn path=/branches/reactos-yarotows/; revision=46932
2010-04-18 23:48:11 +00:00
Jérôme Gardou 18f210877b [WIN32K]
- Do not create a PDEVOBJ for nothing at startup
  - Create the surface for real in IntCreatePrimarySurface

svn path=/branches/reactos-yarotows/; revision=46930
2010-04-18 23:15:02 +00:00
Jérôme Gardou 1e00973f21 grotesque copy-paste mistake
svn path=/branches/reactos-yarotows/; revision=46926
2010-04-18 17:36:11 +00:00
Jérôme Gardou 4cc8e60093 [WIN32K]
- The last DC_vPrepareForBlit/DC_vFinishBlit commit

svn path=/branches/reactos-yarotows/; revision=46925
2010-04-18 17:33:03 +00:00
Jérôme Gardou 11131896db [WIN32K]
- More DC_vPrepareDCsForBlit/DC_vFinishBlit with assorted MouseSafetyOnDrawEnd removals

svn path=/branches/reactos-yarotows/; revision=46923
2010-04-18 17:19:36 +00:00
Jérôme Gardou 62473c84e9 Sync to trunk (r46918)
svn path=/branches/reactos-yarotows/; revision=46920
2010-04-18 14:06:07 +00:00
Jérôme Gardou 53222b46da [WIN32K]
- Use DC_vPrepareForBlit, DC_vFinishBlit in GreTextOutputW
  - So we can get rid of MouseSafetyOnDraw{Start,End} in IntEngMaskBlt

svn path=/branches/reactos-yarotows/; revision=46911
2010-04-17 22:48:44 +00:00
Jérôme Gardou fa0a6275a9 [WIN32K]
- apply policy into DC_vPrepareDCsForBlit as in GDIOBJ_LockMultipleObjects before Physicus sees this :-D
  - GDIOBJ_LockObj : return NULL when handle is NULL : more speed, less debug output

svn path=/branches/reactos-yarotows/; revision=46909
2010-04-17 20:51:42 +00:00
Jérôme Gardou d2655f9e72 [WIN32K]
- Now we welcome GreStretchBltMask into the fabulous world of GDIOBJ_LockMultipleObjects, DC_vPrepareDCsForBlit and DC_vFinishBlit
  - With the assorted MouseSafetyOnDraw{Start,End} removal

svn path=/branches/reactos-yarotows/; revision=46908
2010-04-17 20:27:32 +00:00
Jérôme Gardou 663acbc064 [WIN32K]
- 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
2010-04-17 15:24:10 +00:00
Jérôme Gardou 42073050d4 [WIN32K]
-Use GDIOBJ_LockMultipleObjs, DC_vPrepareDCsForBlit and DC_vFinishBlit in NtGdiTransparentBlt
  -Get rid of MouseSafetyOnDraw{End,Start} in IntEngTransparentBlt

svn path=/branches/reactos-yarotows/; revision=46905
2010-04-17 14:46:05 +00:00
Jérôme Gardou 859f9c2a13 Fix typo...
svn path=/branches/reactos-yarotows/; revision=46903
2010-04-17 14:24:50 +00:00
Jérôme Gardou 0cdfd4399d [WIN32K]
- 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
2010-04-17 14:20:48 +00:00
Jérôme Gardou 4ec4675b9e [WIN32K]
- There is currently no need to lock more than three objects at a time, this permits code simplification/speed
  - Keep the handles order in GDIOBJ_LockMultipleObjs
Still unused...

svn path=/branches/reactos-yarotows/; revision=46899
2010-04-16 16:55:52 +00:00
Jérôme Gardou 6a8d2ef675 revert the DC list stuff, it's not worth it (tm). Things will be done differently
svn path=/branches/reactos-yarotows/; revision=46892
2010-04-16 09:49:05 +00:00
Jérôme Gardou a4e83efd83 [WIN32K]
- 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
2010-04-15 22:38:04 +00:00
Jérôme Gardou 2a6301401d [WIN32K]
- Maintain a list of DC attached to a PDEVOBJ
No functional change for now, stay tuned!

svn path=/branches/reactos-yarotows/; revision=46885
2010-04-15 19:07:07 +00:00
Jérôme Gardou c3731e5552 [WIN32K]
- get rid of ROS_DC::BitsPerPixel.
1 - It was a hack.
2 - Its use was inconsistent.

svn path=/branches/reactos-yarotows/; revision=46848
2010-04-12 18:44:36 +00:00
Jérôme Gardou c9353947a1 completely revert 46733
svn path=/branches/reactos-yarotows/; revision=46846
2010-04-11 21:32:53 +00:00
Jérôme Gardou 243eeb574a [WIN32K]
-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
2010-04-05 10:58:43 +00:00
Jérôme Gardou 6638a5b899 Sync with trunk (aka 'I want my virtualbox mouse integration too')
svn path=/branches/reactos-yarotows/; revision=46732
2010-04-05 09:59:21 +00:00
Jérôme Gardou 34a9bb0081 [WIN32K]
Unlock surface when deleting DC

svn path=/branches/reactos-yarotows/; revision=46698
2010-04-03 16:42:04 +00:00