[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 21 Apr 2010 12:21:53 +0000 (12:21 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 21 Apr 2010 12:21:53 +0000 (12:21 +0000)
- 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

subsystems/win32/win32k/TODO.txt
subsystems/win32/win32k/eng/pdevobj.c
subsystems/win32/win32k/objects/dclife.c

index 558719d..cc753f5 100644 (file)
@@ -8,12 +8,18 @@ Please also note, where to find the problem (file / function), and possible
 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 @@ requirements before it can be handled.
   2.) Use FLOATOBJ
   3.) Use KeSaveFloatingPointState (slow, avoid!)
 
-# Rewrite the handle manager! Once and for all!
-
+# 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.
 
index 412bbbd..cc459fb 100644 (file)
@@ -126,6 +126,13 @@ PDEVOBJ_bEnablePDEV(
                                   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 @@ EngpCreatePDEV(
     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 @@ EngpCreatePDEV(
         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 @@ PDEVOBJ_vSwitchPdev(
     PPDEVOBJ ppdev2)
 {
     PDEVOBJ pdevTmp;
-    HDEV hdev;
 
     /* Exchange data */
     pdevTmp = *ppdev;
@@ -307,12 +307,11 @@ PDEVOBJ_vSwitchPdev(
     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;
index 71d3501..95d3b87 100644 (file)
@@ -369,7 +369,6 @@ DC_Cleanup(PVOID ObjectBody)
         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)