Commit d4361253 authored by Alexandre Julliard's avatar Alexandre Julliard

No need to preallocate DCEs since they are allocated on demand

anyway.
parent c7d39318
......@@ -12,7 +12,6 @@
#include "wine/winuser16.h"
#include "controls.h"
#include "dce.h"
#include "global.h"
#include "input.h"
#include "keyboard.h"
......@@ -211,9 +210,6 @@ BOOL WINAPI USER_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/* Setup palette function pointers */
palette_init();
/* Create the DCEs */
DCE_Init();
/* Initialize window procedures */
if (!WINPROC_Init()) return FALSE;
......
......@@ -31,10 +31,8 @@
DEFAULT_DEBUG_CHANNEL(dc);
#define NB_DCE 5 /* Number of DCEs created at startup */
static DCE *firstDCE = 0;
static HDC defaultDCstate = 0;
static DCE *firstDCE;
static HDC defaultDCstate;
static void DCE_DeleteClipRgn( DCE* );
static INT DCE_ReleaseDC( DCE* );
......@@ -80,6 +78,7 @@ DCE *DCE_AllocDCE( HWND hWnd, DCE_TYPE type )
HeapFree( GetProcessHeap(), 0, dce );
return 0;
}
if (!defaultDCstate) defaultDCstate = GetDCState16( dce->hDC );
wnd = WIN_FindWndPtr(hWnd);
......@@ -356,21 +355,6 @@ BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
return bRet;
}
/***********************************************************************
* DCE_Init
*/
void DCE_Init(void)
{
int i;
DCE * dce;
for (i = 0; i < NB_DCE; i++)
{
if (!(dce = DCE_AllocDCE( 0, DCE_CACHE_DC ))) return;
if (!defaultDCstate) defaultDCstate = GetDCState16( dce->hDC );
}
}
/***********************************************************************
* DCE_GetVisRect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment