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/win3... ============================================================================== --- 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/win3... ============================================================================== --- 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) ;