mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[WIN32K]
Use user mode mem for bitmaps larger than 4K to save pool memory. svn path=/trunk/; revision=56462
This commit is contained in:
parent
aedd14f915
commit
9c5d9d1b46
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue