mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +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
|
@ -143,7 +143,7 @@ NtGdiCreateBitmap(
|
||||||
IN OPTIONAL LPBYTE pUnsafeBits)
|
IN OPTIONAL LPBYTE pUnsafeBits)
|
||||||
{
|
{
|
||||||
HBITMAP hbmp;
|
HBITMAP hbmp;
|
||||||
ULONG cRealBpp, cjWidthBytes, iFormat;
|
ULONG cRealBpp, cjWidthBytes, iFormat, fjBitmap;
|
||||||
ULONGLONG cjSize;
|
ULONGLONG cjSize;
|
||||||
PSURFACE psurf;
|
PSURFACE psurf;
|
||||||
|
|
||||||
|
@ -165,12 +165,15 @@ NtGdiCreateBitmap(
|
||||||
return NULL;
|
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) */
|
/* Allocate the surface (but don't set the bits) */
|
||||||
psurf = SURFACE_AllocSurface(STYPE_BITMAP,
|
psurf = SURFACE_AllocSurface(STYPE_BITMAP,
|
||||||
nWidth,
|
nWidth,
|
||||||
nHeight,
|
nHeight,
|
||||||
iFormat,
|
iFormat,
|
||||||
0,
|
fjBitmap,
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
if (!psurf)
|
if (!psurf)
|
||||||
|
|
Loading…
Reference in a new issue