gdi32: Use NtGdiCreateDIBSection for CreateDIBSection.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b2522bfb90
commit
f6e584e626
|
@ -877,7 +877,7 @@ BOOL WINAPI GdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDest,
|
||||||
info.bmiHeader.biPlanes = 1;
|
info.bmiHeader.biPlanes = 1;
|
||||||
info.bmiHeader.biBitCount = 24;
|
info.bmiHeader.biBitCount = 24;
|
||||||
info.bmiHeader.biCompression = BI_RGB;
|
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 );
|
else bmpWork = NtGdiCreateCompatibleBitmap( hdcDest, widthDest, heightDest );
|
||||||
oldWork = NtGdiSelectBitmap(hdcWork, bmpWork);
|
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) );
|
memcpy( bi->bmiColors, dib.dsBitfields, sizeof(dib.dsBitfields) );
|
||||||
else if (dib.dsBmih.biBitCount <= 8) /* copy the color table */
|
else if (dib.dsBmih.biBitCount <= 8) /* copy the color table */
|
||||||
NtGdiDoPalette( hdc, 0, 256, bi->bmiColors, NtGdiGetDIBColorTable, FALSE );
|
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:
|
default:
|
||||||
return 0;
|
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,
|
HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, const BITMAPINFO *bmi,
|
||||||
void **bits, HANDLE section, DWORD offset)
|
UINT usage, UINT header_size, ULONG flags,
|
||||||
|
ULONG_PTR color_space, void **bits )
|
||||||
{
|
{
|
||||||
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
|
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
|
||||||
BITMAPINFO *info = (BITMAPINFO *)buffer;
|
BITMAPINFO *info = (BITMAPINFO *)buffer;
|
||||||
|
|
|
@ -753,6 +753,15 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header, DWORD in
|
||||||
0, 0, 0, 0 );
|
0, 0, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* 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.@)
|
* GetDIBits (win32u.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -222,6 +222,9 @@ HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWO
|
||||||
const void *bits, const BITMAPINFO *data,
|
const void *bits, const BITMAPINFO *data,
|
||||||
UINT coloruse, UINT max_info, UINT max_bits,
|
UINT coloruse, UINT max_info, UINT max_bits,
|
||||||
ULONG flags, HANDLE xform );
|
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 );
|
HPALETTE WINAPI NtGdiCreateHalftonePalette( HDC hdc );
|
||||||
HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen );
|
HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen );
|
||||||
HDC WINAPI NtGdiCreateMetafileDC( HDC hdc );
|
HDC WINAPI NtGdiCreateMetafileDC( HDC hdc );
|
||||||
|
|
Loading…
Reference in New Issue