mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 02:43:48 +00:00
[Win32k]
- Remove CriticalRegion calls. svn path=/trunk/; revision=45197
This commit is contained in:
parent
f4519c0c43
commit
be48e3ae53
|
@ -159,7 +159,6 @@ DC_AllocateDcAttr(HDC hDC)
|
|||
PVOID NewMem = NULL;
|
||||
PDC pDC;
|
||||
|
||||
KeEnterCriticalRegion();
|
||||
{
|
||||
INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hDC);
|
||||
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
||||
|
@ -179,7 +178,6 @@ DC_AllocateDcAttr(HDC hDC)
|
|||
DPRINT1("DC_ATTR not allocated!\n");
|
||||
}
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
pDC = DC_LockDc(hDC);
|
||||
ASSERT(pDC->pdcattr == &pDC->dcattr);
|
||||
if (NewMem)
|
||||
|
@ -198,7 +196,6 @@ DC_FreeDcAttr(HDC DCToFree )
|
|||
pDC->pdcattr = &pDC->dcattr;
|
||||
DC_UnlockDc(pDC);
|
||||
|
||||
KeEnterCriticalRegion();
|
||||
{
|
||||
INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)DCToFree);
|
||||
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
||||
|
@ -208,7 +205,6 @@ DC_FreeDcAttr(HDC DCToFree )
|
|||
Entry->UserData = NULL;
|
||||
}
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -755,10 +755,8 @@ GreDeleteObject(HGDIOBJ hObject)
|
|||
}
|
||||
if (pAttr)
|
||||
{
|
||||
KeEnterCriticalRegion();
|
||||
FreeObjectAttr(pAttr);
|
||||
Entry->UserData = NULL;
|
||||
KeLeaveCriticalRegion();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1575,12 +1573,10 @@ IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask)
|
|||
level functions.
|
||||
*/
|
||||
// FIXME! HAX!!! Remove this once we get everything right!
|
||||
KeEnterCriticalRegion();
|
||||
Index = GDI_HANDLE_GET_INDEX(hRgn);
|
||||
Entry = &GdiHandleTable->Entries[Index];
|
||||
if (Entry->UserData) FreeObjectAttr(Entry->UserData);
|
||||
Entry->UserData = NULL;
|
||||
KeLeaveCriticalRegion();
|
||||
//
|
||||
if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE)
|
||||
{
|
||||
|
|
|
@ -2063,11 +2063,9 @@ REGION_AllocRgnWithHandle(INT nReg)
|
|||
}
|
||||
}
|
||||
|
||||
KeEnterCriticalRegion();
|
||||
Index = GDI_HANDLE_GET_INDEX(hReg);
|
||||
Entry = &GdiHandleTable->Entries[Index];
|
||||
Entry->UserData = AllocateObjectAttr();
|
||||
KeLeaveCriticalRegion();
|
||||
|
||||
EMPTY_REGION(pReg);
|
||||
pReg->rdh.dwSize = sizeof(RGNDATAHEADER);
|
||||
|
@ -2091,12 +2089,10 @@ RGNOBJAPI_Lock(HRGN hRgn, PRGN_ATTR *ppRgn_Attr)
|
|||
|
||||
if (pRgn)
|
||||
{
|
||||
KeEnterCriticalRegion();
|
||||
Index = GDI_HANDLE_GET_INDEX(hRgn);
|
||||
Entry = &GdiHandleTable->Entries[Index];
|
||||
pRgn_Attr = Entry->UserData;
|
||||
pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
||||
KeLeaveCriticalRegion();
|
||||
|
||||
if ( pid == NtCurrentTeb()->ClientId.UniqueProcess &&
|
||||
pRgn_Attr )
|
||||
|
@ -2151,12 +2147,10 @@ RGNOBJAPI_Unlock(PROSRGNDATA pRgn)
|
|||
|
||||
if (pRgn)
|
||||
{
|
||||
KeEnterCriticalRegion();
|
||||
Index = GDI_HANDLE_GET_INDEX(pRgn->BaseObject.hHmgr);
|
||||
Entry = &GdiHandleTable->Entries[Index];
|
||||
pRgn_Attr = Entry->UserData;
|
||||
pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
||||
KeLeaveCriticalRegion();
|
||||
|
||||
if ( pid == NtCurrentTeb()->ClientId.UniqueProcess &&
|
||||
pRgn_Attr )
|
||||
|
|
Loading…
Reference in a new issue