completely revert 46733

svn path=/branches/reactos-yarotows/; revision=46846
This commit is contained in:
Jérôme Gardou 2010-04-11 21:32:53 +00:00
parent 47cbf8f46d
commit c9353947a1
2 changed files with 7 additions and 7 deletions

View file

@ -176,9 +176,12 @@ DC_LockDc(HDC hdc)
/* 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 @@ DC_UnlockDc(PDC pdc)
{
if(pdc->dctype == DCTYPE_DIRECT)
{
/* Release surface lock */
SURFACE_ShareUnlockSurface(pdc->dclevel.pSurface);
/* Release PDEV lock */
EngReleaseSemaphore(pdc->ppdev->hsemDevLock);
}

View file

@ -377,8 +377,7 @@ ASSERT(pdc->rosdc.hGCClipRgn);
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) ;