[ros-diffs] [jgardou] 46846: completely revert 46733

jgardou at svn.reactos.org jgardou at svn.reactos.org
Sun Apr 11 23:32:53 CEST 2010


Author: jgardou
Date: Sun Apr 11 23:32:53 2010
New Revision: 46846

URL: http://svn.reactos.org/svn/reactos?rev=46846&view=rev
Log:
completely revert 46733

Modified:
    branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h
    branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c

Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h?rev=46846&r1=46845&r2=46846&view=diff
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] Sun Apr 11 23:32:53 2010
@@ -176,9 +176,12 @@
         /* Acquire shared PDEV lock */
         EngAcquireSemaphoreShared(pdc->ppdev->hsemDevLock);
 
-        /* Assign Surface */
-        pdc->dclevel.pSurface = PDEVOBJ_pSurface(pdc->ppdev);
-
+        /* Update Surface if needed */
+        if(pdc->dclevel.pSurface != pdc->ppdev->pSurface)
+        {
+            if(pdc->dclevel.pSurface) SURFACE_ShareUnlockSurface(pdc->dclevel.pSurface);
+            pdc->dclevel.pSurface = PDEVOBJ_pSurface(pdc->ppdev);
+        }
     }
     return pdc;
 }
@@ -189,8 +192,6 @@
 {
     if(pdc->dctype == DCTYPE_DIRECT)
     {
-        /* Release surface lock */
-        SURFACE_ShareUnlockSurface(pdc->dclevel.pSurface);
         /* Release PDEV lock */
         EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
     }

Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c?rev=46846&r1=46845&r2=46846&view=diff
==============================================================================
--- 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] Sun Apr 11 23:32:53 2010
@@ -377,8 +377,7 @@
 
     PATH_Delete(pdc->dclevel.hPath);
 
-    /* Ideally, no DC should hold a lock on a surface when being deleted */
-    if(pdc->dclevel.pSurface && pdc->dctype != DCTYPE_DIRECT)
+    if(pdc->dclevel.pSurface)
         SURFACE_ShareUnlockSurface(pdc->dclevel.pSurface);
 
     PDEVOBJ_vRelease(pdc->ppdev) ;




More information about the Ros-diffs mailing list