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 ExInitializeFastMutex(&ppiCurrent
->PrivateFontListLock
);
26 InitializeListHead(&ppiCurrent
->GDIBrushAttrFreeList
);
27 InitializeListHead(&ppiCurrent
->GDIDcAttrFreeList
);
29 /* Map the GDI handle table to user land */
30 Process
->Peb
->GdiSharedHandleTable
= GDI_MapHandleTable(Process
);
31 Process
->Peb
->GdiDCAttributeList
= GDI_BATCH_LIMIT
;
33 /* Create pools for GDI object attributes */
34 ppiCurrent
->pPoolDcAttr
= GdiPoolCreate(sizeof(DC_ATTR
), 'acdG');
35 ppiCurrent
->pPoolBrushAttr
= GdiPoolCreate(sizeof(BRUSH_ATTR
), 'arbG');
36 ppiCurrent
->pPoolRgnAttr
= GdiPoolCreate(sizeof(RGN_ATTR
), 'agrG');
37 ASSERT(ppiCurrent
->pPoolDcAttr
);
38 ASSERT(ppiCurrent
->pPoolBrushAttr
);
39 ASSERT(ppiCurrent
->pPoolRgnAttr
);
41 return STATUS_SUCCESS
;
45 GdiProcessDestroy(PEPROCESS Process
)
47 PPROCESSINFO ppiCurrent
= PsGetProcessWin32Process(Process
);
49 ASSERT(ppiCurrent
->peProcess
== Process
);
51 /* And GDI ones too */
52 GDI_CleanupForProcess(Process
);
54 /* So we can now free the pools */
55 GdiPoolDestroy(ppiCurrent
->pPoolDcAttr
);
56 GdiPoolDestroy(ppiCurrent
->pPoolBrushAttr
);
57 GdiPoolDestroy(ppiCurrent
->pPoolRgnAttr
);
59 return STATUS_SUCCESS
;
64 GdiThreadCreate(PETHREAD Thread
)
66 return STATUS_SUCCESS
;
70 GdiThreadDestroy(PETHREAD Thread
)
72 return STATUS_SUCCESS
;