mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 09:24:11 +00:00
completely revert 46733
svn path=/branches/reactos-yarotows/; revision=46846
This commit is contained in:
parent
47cbf8f46d
commit
c9353947a1
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) ;
|
||||
|
|
Loading…
Reference in a new issue