Commit f6e584e6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiCreateDIBSection for CreateDIBSection.

parent b2522bfb
......@@ -877,7 +877,7 @@ BOOL WINAPI GdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDest,
info.bmiHeader.biPlanes = 1;
info.bmiHeader.biBitCount = 24;
info.bmiHeader.biCompression = BI_RGB;
bmpWork = CreateDIBSection( 0, &info, DIB_RGB_COLORS, NULL, NULL, 0 );
bmpWork = NtGdiCreateDIBSection( 0, NULL, 0, &info, DIB_RGB_COLORS, 0, 0, 0, NULL );
}
else bmpWork = NtGdiCreateCompatibleBitmap( hdcDest, widthDest, heightDest );
oldWork = NtGdiSelectBitmap(hdcWork, bmpWork);
......
......@@ -76,7 +76,7 @@ HBITMAP WINAPI NtGdiCreateCompatibleBitmap( HDC hdc, INT width, INT height )
memcpy( bi->bmiColors, dib.dsBitfields, sizeof(dib.dsBitfields) );
else if (dib.dsBmih.biBitCount <= 8) /* copy the color table */
NtGdiDoPalette( hdc, 0, 256, bi->bmiColors, NtGdiGetDIBColorTable, FALSE );
return CreateDIBSection( hdc, bi, DIB_RGB_COLORS, NULL, NULL, 0 );
return NtGdiCreateDIBSection( hdc, NULL, 0, bi, DIB_RGB_COLORS, 0, 0, 0, NULL );
default:
return 0;
......
......@@ -1460,10 +1460,11 @@ HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWOR
/***********************************************************************
* CreateDIBSection (GDI32.@)
* NtGdiCreateDIBSection (win32u.@)
*/
HBITMAP WINAPI DECLSPEC_HOTPATCH CreateDIBSection(HDC hdc, const BITMAPINFO *bmi, UINT usage,
void **bits, HANDLE section, DWORD offset)
HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, const BITMAPINFO *bmi,
UINT usage, UINT header_size, ULONG flags,
ULONG_PTR color_space, void **bits )
{
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
BITMAPINFO *info = (BITMAPINFO *)buffer;
......
......@@ -754,6 +754,15 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header, DWORD in
}
/***********************************************************************
* CreateDIBSection (GDI32.@)
*/
HBITMAP WINAPI DECLSPEC_HOTPATCH CreateDIBSection( HDC hdc, const BITMAPINFO *bmi, UINT usage,
void **bits, HANDLE section, DWORD offset )
{
return NtGdiCreateDIBSection( hdc, section, offset, bmi, usage, 0, 0, 0, bits );
}
/***********************************************************************
* GetDIBits (win32u.@)
*/
INT WINAPI DECLSPEC_HOTPATCH GetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines,
......
......@@ -222,6 +222,9 @@ HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWO
const void *bits, const BITMAPINFO *data,
UINT coloruse, UINT max_info, UINT max_bits,
ULONG flags, HANDLE xform );
HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, const BITMAPINFO *bmi,
UINT usage, UINT header_size, ULONG flags,
ULONG_PTR color_space, void **bits );
HPALETTE WINAPI NtGdiCreateHalftonePalette( HDC hdc );
HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen );
HDC WINAPI NtGdiCreateMetafileDC( HDC hdc );
......
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