Author: jimtabor
Date: Thu Dec 13 23:27:28 2007
New Revision: 31204
URL: http://svn.reactos.org/svn/reactos?rev=31204&view=rev
Log:
Up the handle count to 0x10000, reset adjustment to support change. Add device capabilities to handle table.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/include/gdiobj.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 Dec 13 23:27:28 2007
@@ -18,8 +18,8 @@
/* Base address where the handle table is mapped to */
#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
-/* GDI handle table can hold 0x4000 handles */
-#define GDI_HANDLE_COUNT 0x4000
+/* GDI handle table can hold 0x10000 handles */
+#define GDI_HANDLE_COUNT 0x10000
#define GDI_GLOBAL_PROCESS (0x0)
/* Handle Masks and shifts */
Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h Thu Dec 13 23:27:28 2007
@@ -11,10 +11,14 @@
typedef struct _GDI_HANDLE_TABLE
{
- /* the table must be located at the beginning of this structure so it can be
- properly mapped! */
+/* The table must be located at the beginning of this structure so it can be
+ * properly mapped!
+ */
+//////////////////////////////////////////////////////////////////////////////
GDI_TABLE_ENTRY Entries[GDI_HANDLE_COUNT];
-
+ DEVCAPS DevCaps; // Device Capabilities
+ // Font data
+//////////////////////////////////////////////////////////////////////////////
PPAGED_LOOKASIDE_LIST LookasideLists;
SLIST_HEADER FreeEntriesHead;
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 Dec 13 23:27:28 2007
@@ -238,7 +238,7 @@
DPRINT1("reporting gdi handle abusers:\n");
/* step through GDI handle table and find out who our culprit is... */
- for ( i = RESERVE_ENTRIES_COUNT; i < GDI_HANDLE_COUNT; i++ )
+ for ( i = RESERVE_ENTRIES_COUNT; i < GDI_HANDLE_COUNT-1; i++ )
{
for ( j = 0; j < n; j++ )
{
@@ -787,7 +787,7 @@
HandleUpper = GDI_HANDLE_GET_UPPER(hObj);
/* Check that the handle index is valid. */
- if (HandleIndex >= GDI_HANDLE_COUNT)
+ if (HandleIndex >= GDI_HANDLE_COUNT-1)
return NULL;
Entry = &HandleTable->Entries[HandleIndex];
@@ -935,7 +935,7 @@
HandleUpper = GDI_HANDLE_GET_UPPER(hObj);
/* Check that the handle index is valid. */
- if (HandleIndex >= GDI_HANDLE_COUNT)
+ if (HandleIndex >= GDI_HANDLE_COUNT-1)
return NULL;
/* Check if we have the requested type */
Author: jimtabor
Date: Thu Dec 13 21:34:46 2007
New Revision: 31203
URL: http://svn.reactos.org/svn/reactos?rev=31203&view=rev
Log:
Thanks Timo! I have updated the information too.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
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 Dec 13 21:34:46 2007
@@ -1509,12 +1509,21 @@
IN ULONG ulType
)
{
-// INT Index;
-// PGDI_TABLE_ENTRY Entry;
- HANDLE handle = GDIOBJ_AllocObj(GdiHandleTable, GDI_OBJECT_TAG_CLIOBJ);
+// ATM we use DC object for KernelData. I think it should be at a minimum GDIOBJEMPTYHDR.
+// The UserData is set in user mode, so it is always NULL.
+//
+ INT Index;
+ PGDI_TABLE_ENTRY Entry;
+ HANDLE handle = GDIOBJ_AllocObj(GdiHandleTable, GDI_OBJECT_TYPE_CLIOBJ);
// Need to change handle type based on ulType.
-// Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)handle);
-// Entry = &GdiHandleTable->Entries[Index];
+ Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)handle);
+ Entry = &GdiHandleTable->Entries[Index];
+// mask out lower half and set the type by ulType.
+ Entry->Type &= GDI_HANDLE_UPPER_MASK;
+ Entry->Type |= ulType >> GDI_ENTRY_UPPER_SHIFT;
+// mask out handle type than set it by ulType.
+ handle = (HANDLE)(((ULONG_PTR)(handle)) & (GDI_HANDLE_REUSE_MASK|GDI_HANDLE_STOCK_MASK|0x0ffff));
+ handle = (HANDLE)(((ULONG_PTR)(handle)) | ulType);
return handle;
}
@@ -1525,7 +1534,7 @@
IN HANDLE h
)
{
- return GDIOBJ_FreeObj(GdiHandleTable, h, GDI_OBJECT_TAG_CLIOBJ);
+ return GDIOBJ_FreeObj(GdiHandleTable, h, GDI_OBJECT_TYPE_CLIOBJ);
}
/* EOF */
Author: dreimer
Date: Thu Dec 13 20:03:01 2007
New Revision: 31201
URL: http://svn.reactos.org/svn/reactos?rev=31201&view=rev
Log:
OK, this has no right to be in here... "as developed primarily through reverse-engineering of the original MS bios and its boot process."
A diff will be provided in the future.
Removed:
trunk/reactos/tools/xbox/