Fix gdi init so it can support batch. Used wrong limit source.

svn path=/trunk/; revision=29993
This commit is contained in:
James Tabor 2007-10-31 02:48:54 +00:00
parent bb884beb4a
commit b45ddf2209
3 changed files with 6 additions and 7 deletions

View file

@ -37,7 +37,7 @@ GdiProcessSetup (VOID)
/* map the gdi handle table to user space */ /* map the gdi handle table to user space */
GdiHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable; GdiHandleTable = NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable;
CurrentProcessId = NtCurrentTeb()->Cid.UniqueProcess; CurrentProcessId = NtCurrentTeb()->Cid.UniqueProcess;
GDI_BatchLimit = NtCurrentTeb()->GdiBatchCount; GDI_BatchLimit = (DWORD) NtCurrentTeb()->ProcessEnvironmentBlock->GdiDCAttributeList;
} }
@ -59,23 +59,21 @@ GdiDllInitialize (
break; break;
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
NtCurrentTeb()->GdiTebBatch.Offset = 0;
NtCurrentTeb()->GdiBatchCount = 0;
break; break;
default: default:
return FALSE; return FALSE;
} }
#if 0
/* FIXME: working teb handling needed */
NtCurrentTeb()->GdiTebBatch.Offset = 0;
NtCurrentTeb()->GdiBatchCount = 0;
#endif
// Very simple, the list will fill itself as it is needed. // Very simple, the list will fill itself as it is needed.
if(!SetStockObjects) if(!SetStockObjects)
{ {
RtlZeroMemory( &stock_objects, NB_STOCK_OBJECTS); //Assume Ros is dirty. RtlZeroMemory( &stock_objects, NB_STOCK_OBJECTS); //Assume Ros is dirty.
SetStockObjects = TRUE; SetStockObjects = TRUE;
} }
return TRUE; return TRUE;
} }

View file

@ -627,7 +627,7 @@ typedef struct _PEB
PVOID* ProcessHeaps; PVOID* ProcessHeaps;
PVOID GdiSharedHandleTable; PVOID GdiSharedHandleTable;
PVOID ProcessStarterHelper; PVOID ProcessStarterHelper;
PVOID GdiDCAttributeList; ULONG GdiDCAttributeList;
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_LONGHORN)
struct _RTL_CRITICAL_SECTION *LoaderLock; struct _RTL_CRITICAL_SECTION *LoaderLock;
#else #else

View file

@ -117,6 +117,7 @@ Win32kProcessCallback(struct _EPROCESS *Process,
{ {
/* map the gdi handle table to user land */ /* map the gdi handle table to user land */
Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(GdiTableSection, Process); Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(GdiTableSection, Process);
Process->Peb->GdiDCAttributeList = 5;
} }
/* setup process flags */ /* setup process flags */