Use user mode mem for bitmaps larger than 4K to save pool memory.

svn path=/trunk/; revision=56462
This commit is contained in:
Timo Kreuzer 2012-05-01 12:47:21 +00:00
parent aedd14f915
commit 9c5d9d1b46

View file

@ -143,7 +143,7 @@ NtGdiCreateBitmap(
IN OPTIONAL LPBYTE pUnsafeBits)
{
HBITMAP hbmp;
ULONG cRealBpp, cjWidthBytes, iFormat;
ULONG cRealBpp, cjWidthBytes, iFormat, fjBitmap;
ULONGLONG cjSize;
PSURFACE psurf;
@ -165,12 +165,15 @@ NtGdiCreateBitmap(
return NULL;
}
/* Allocations larger than PAGE_SIZE go into user mem */
fjBitmap = (cjSize > PAGE_SIZE) ? BMF_USERMEM : 0;
/* Allocate the surface (but don't set the bits) */
psurf = SURFACE_AllocSurface(STYPE_BITMAP,
nWidth,
nHeight,
iFormat,
0,
fjBitmap,
0,
NULL);
if (!psurf)