No need to preallocate DCEs since they are allocated on demand
anyway.
This commit is contained in:
parent
c7d3931863
commit
d436125345
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue