2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Win32k subsystem
4 * PURPOSE: Initialization of GDI
5 * FILE: win32ss/gdi/ntgdi/init.c
15 BOOL NTAPI
GDI_CleanupForProcess(struct _EPROCESS
*Process
);
18 GdiProcessCreate(PEPROCESS Process
)
20 PPROCESSINFO ppiCurrent
= PsGetProcessWin32Process(Process
);
23 InitializeListHead(&ppiCurrent
->PrivateFontListHead
);
24 InitializeListHead(&ppiCurrent
->PrivateMemFontListHead
);
25 ppiCurrent
->PrivateMemFontHandleCount
= 0;
26 ExInitializeFastMutex(&ppiCurrent
->PrivateFontListLock
);
28 InitializeListHead(&ppiCurrent
->GDIBrushAttrFreeList
);
29 InitializeListHead(&ppiCurrent
->GDIDcAttrFreeList
);
31 /* Map the GDI handle table to user land */
32 Process
->Peb
->GdiSharedHandleTable
= GDI_MapHandleTable(Process
);
33 Process
->Peb
->GdiDCAttributeList
= GDI_BATCH_LIMIT
;
35 /* Create pools for GDI object attributes */
36 ppiCurrent
->pPoolDcAttr
= GdiPoolCreate(sizeof(DC_ATTR
), 'acdG');
37 ppiCurrent
->pPoolBrushAttr
= GdiPoolCreate(sizeof(BRUSH_ATTR
), 'arbG');
38 ppiCurrent
->pPoolRgnAttr
= GdiPoolCreate(sizeof(RGN_ATTR
), 'agrG');
39 ASSERT(ppiCurrent
->pPoolDcAttr
);
40 ASSERT(ppiCurrent
->pPoolBrushAttr
);
41 ASSERT(ppiCurrent
->pPoolRgnAttr
);
43 return STATUS_SUCCESS
;
47 GdiProcessDestroy(PEPROCESS Process
)
49 PPROCESSINFO ppiCurrent
= PsGetProcessWin32Process(Process
);
51 ASSERT(ppiCurrent
->peProcess
== Process
);
53 IntGdiCleanupPrivateFontsForProcess();
55 /* And GDI ones too */
56 GDI_CleanupForProcess(Process
);
58 /* So we can now free the pools */
59 GdiPoolDestroy(ppiCurrent
->pPoolDcAttr
);
60 GdiPoolDestroy(ppiCurrent
->pPoolBrushAttr
);
61 GdiPoolDestroy(ppiCurrent
->pPoolRgnAttr
);
63 return STATUS_SUCCESS
;
68 GdiThreadCreate(PETHREAD Thread
)
70 return STATUS_SUCCESS
;
74 GdiThreadDestroy(PETHREAD Thread
)
76 return STATUS_SUCCESS
;