mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 02:37:06 +00:00
- add the missing macro
What the last change does and I missed last commit: - use individual pool tags for each gdi object type - allow object allocation w/o lookaside list - don't search for the lookaside list/cleanup proc, the index into the lists is now calculated from type svn path=/trunk/; revision=28900
This commit is contained in:
parent
77a5b5a508
commit
b232c33052
|
@ -28,6 +28,7 @@
|
|||
#define GDI_HANDLE_REUSE_MASK 0xff000000
|
||||
#define GDI_HANDLE_UPPER_MASK (GDI_HANDLE_TYPE_MASK|GDI_HANDLE_STOCK_MASK|GDI_HANDLE_REUSE_MASK)
|
||||
#define GDI_HANDLE_REUSECNT_SHIFT 24
|
||||
#define GDI_HANDLE_BASETYPE_SHIFT 16
|
||||
|
||||
#define GDI_ENTRY_STOCK_MASK 0x00000080
|
||||
#define GDI_ENTRY_REUSE_MASK 0x0000ff00
|
||||
|
@ -117,6 +118,9 @@
|
|||
#define GDI_ENTRY_GET_REUSECNT(e) \
|
||||
((((ULONG_PTR)(e)) & GDI_ENTRY_REUSE_MASK) >> GDI_ENTRY_REUSECNT_SHIFT)
|
||||
|
||||
#define GDI_OBJECT_GET_TYPE_INDEX(t) \
|
||||
((t & GDI_HANDLE_BASETYPE_MASK) >> GDI_HANDLE_BASETYPE_SHIFT)
|
||||
|
||||
/* DC OBJ Types */
|
||||
#define DC_TYPE_DIRECT 0 // normal device context
|
||||
#define DC_TYPE_MEMORY 1 // memory device context
|
||||
|
|
|
@ -364,7 +364,7 @@ GDIOBJ_AllocObj(PGDI_HANDLE_TABLE HandleTable, ULONG ObjectType)
|
|||
|
||||
ASSERT(ObjectType != GDI_OBJECT_TYPE_DONTCARE);
|
||||
|
||||
TypeIndex = 0; //GDI_OBJECT_GET_TYPE_INDEX(ObjectType);
|
||||
TypeIndex = GDI_OBJECT_GET_TYPE_INDEX(ObjectType);
|
||||
if (ObjTypeInfo[TypeIndex].bUseLookaside)
|
||||
{
|
||||
LookasideList = FindLookasideList(HandleTable, TypeIndex);
|
||||
|
@ -583,7 +583,7 @@ LockHandle:
|
|||
}
|
||||
|
||||
/* call the cleanup routine. */
|
||||
TypeIndex = 0; //GDI_OBJECT_GET_TYPE_INDEX(HandleType);
|
||||
TypeIndex = GDI_OBJECT_GET_TYPE_INDEX(HandleType);
|
||||
Ret = RunCleanupCallback(GDIHdrToBdy(GdiHdr), TypeIndex);
|
||||
|
||||
/* Now it's time to free the memory */
|
||||
|
|
Loading…
Reference in a new issue