Author: tkreuzer
Date: Wed Apr 21 14:21:53 2010
New Revision: 46975
URL: http://svn.reactos.org/svn/reactos?rev=46975&view=rev
Log:
[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
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/TODO.txt
branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c
branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/TODO.txt
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/TODO.txt [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/TODO.txt [iso-8859-1] Wed Apr 21 14:21:53 2010
@@ -8,12 +8,18 @@
requirements before it can be handled.
-# Lock the PDEV lock only when we are going to touch the PDEV or the Surface
- Currently the PDEV is locked (shared HSEM == ERESOURCE) when we lock the DC,
- this is only a minimal implementation, as we don't need to do that, when we
- don't even touch anything from the PDEV or the surface. This should be
- optimized. (see dc.h, DC_LockDc)
+Before the merge:
+-----------------
+# Fix mouse pointer regression
+# Hide the mouse pointer during mode switch
+# Resize the desktop window after mode switch
+# Update mouse area after mode switch
+# Invalidate the whole Window content after mode switch
+# Validate object type in GDIOBJ_LockMultipleObjs
+
+Generic:
+--------
# Get rid of all float and double in win32k.
We can't use the fpu on x86 in the kernel, as fpu state is not saved in
user/kernel transitions. There are 3 possible solutions:
@@ -21,7 +27,20 @@
2.) Use FLOATOBJ
3.) Use KeSaveFloatingPointState (slow, avoid!)
+# Seperate GDI debug to be usable in all modules.
+ Current version is hardwired into gdiobjects.c
+
# Rewrite the handle manager! Once and for all!
+ Improve naming ("reference" vs "shared lock")
+ Refactor the locking code to share a single inlined function
+ Fix user mode object handling
+ Fix locking order of different object types and same object types.
+ Add debug code to verify locking order.
+ Add checks for immutable objects vs locks
+# Review the global USER lock
+ Currently we lock almost everything with a single lock. This should be
+ reviewed for the possibility to split it into a number of smaller locks to
+ increase scalability. Handle with care, the current solution is a good safety
+ solution.
-
Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c [iso-8859-1] Wed Apr 21 14:21:53 2010
@@ -126,6 +126,13 @@
ppdev->pGraphicsDevice->pwszDescription,
ppdev->pGraphicsDevice->DeviceObject);
+ /* Fix up some values */
+ if (ppdev->gdiinfo.ulLogPixelsX == 0)
+ ppdev->gdiinfo.ulLogPixelsX = 96;
+
+ if (ppdev->gdiinfo.ulLogPixelsY == 0)
+ ppdev->gdiinfo.ulLogPixelsY = 96;
+
DPRINT1("PDEVOBJ_bEnablePDEV - dhpdev = %p\n", ppdev->dhpdev);
return TRUE;
@@ -236,7 +243,8 @@
ppdev->pldev = EngLoadDriver(pdm->dmDeviceName, LDEV_DEVICE_DISPLAY);
if (!ppdev->pldev)
{
- DPRINT1("Could not load diplsay driver '%ls'\n", pGraphicsDevice->pDiplayDrivers);
+ DPRINT1("Could not load display driver '%ls'\n",
+ pGraphicsDevice->pDiplayDrivers);
ExFreePoolWithTag(ppdev, GDITAG_PDEV);
return NULL;
}
@@ -266,13 +274,6 @@
ASSERT(FALSE);
}
- /* Fix up some values */
- if (ppdev->gdiinfo.ulLogPixelsX == 0)
- ppdev->gdiinfo.ulLogPixelsX = 96;
-
- if (ppdev->gdiinfo.ulLogPixelsY == 0)
- ppdev->gdiinfo.ulLogPixelsY = 96;
-
/* FIXME: this must be done in a better way */
pGraphicsDevice->StateFlags |= DISPLAY_DEVICE_ATTACHED_TO_DESKTOP;
@@ -290,7 +291,6 @@
PPDEVOBJ ppdev2)
{
PDEVOBJ pdevTmp;
- HDEV hdev;
/* Exchange data */
pdevTmp = *ppdev;
@@ -307,12 +307,11 @@
ppdev->dhpdev = ppdev2->dhpdev;
ppdev2->dhpdev = pdevTmp.dhpdev;
- /* Exchange surface */
+ /* Exchange surfaces and associate them with their new PDEV */
ppdev->pSurface = ppdev2->pSurface;
ppdev2->pSurface = pdevTmp.pSurface;
- hdev = ppdev->pSurface->SurfObj.hdev;
- ppdev->pSurface->SurfObj.hdev = ppdev2->pSurface->SurfObj.hdev;
- ppdev2->pSurface->SurfObj.hdev = hdev;
+ ppdev->pSurface->SurfObj.hdev = (HDEV)ppdev;
+ ppdev2->pSurface->SurfObj.hdev = (HDEV)ppdev2;
/* Exchange devinfo */
ppdev->devinfo = ppdev2->devinfo;
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Wed Apr 21 14:21:53 2010
@@ -369,7 +369,6 @@
GreDeleteObject(pdc->rosdc.hClipRgn);
if (pdc->prgnVis)
REGION_FreeRgnByHandle(pdc->prgnVis->BaseObject.hHmgr);
-ASSERT(pdc->rosdc.hGCClipRgn);
if (pdc->rosdc.hGCClipRgn)
GreDeleteObject(pdc->rosdc.hGCClipRgn);
if (NULL != pdc->rosdc.CombinedClip)