Author: tkreuzer
Date: Thu Sep 6 17:14:21 2007
New Revision: 28900
URL:
http://svn.reactos.org/svn/reactos?rev=28900&view=rev
Log:
- 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
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Thu Sep 6 17:14:21 2007
@@ -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
@@ -116,6 +117,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
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Thu Sep 6 17:14:21 2007
@@ -364,7 +364,7 @@
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 @@
}
/* 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 */