From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 4 -- dlls/win32u/syscall.c | 4 ++ dlls/win32u/win32u.spec | 8 ++-- dlls/win32u/win32u_private.h | 17 -------- dlls/win32u/wrappers.c | 43 ------------------- dlls/wow64win/gdi.c | 83 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 4 ++ 7 files changed, 95 insertions(+), 68 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index d882f0dd009..ef56fc24a5b 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1031,7 +1031,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca ) static struct unix_funcs unix_funcs = { NtGdiCreateCompatibleDC, - NtGdiCreateDIBitmapInternal, NtGdiCreateMetafileDC, NtGdiDeleteObjectApp, NtGdiDoPalette, @@ -1047,7 +1046,6 @@ static struct unix_funcs unix_funcs = NtGdiGetCharABCWidthsW, NtGdiGetCharWidthW, NtGdiGetCharWidthInfo, - NtGdiGetDIBitsInternal, NtGdiGetDeviceCaps, NtGdiGetDeviceGammaRamp, NtGdiGetFontData, @@ -1075,11 +1073,9 @@ static struct unix_funcs unix_funcs = NtGdiSelectFont, NtGdiSelectPen, NtGdiSetBoundsRect, - NtGdiSetDIBitsToDeviceInternal, NtGdiSetDeviceGammaRamp, NtGdiSetLayout, NtGdiSetSystemPaletteUse, - NtGdiStretchDIBitsInternal, NtGdiUnrealizeObject, NtGdiUpdateColors, NtUserDrawCaptionTemp, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 7a5f116b69e..6d9070c0ea2 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -53,6 +53,7 @@ static void * const syscalls[] = NtGdiCreateCompatibleBitmap, NtGdiCreateDIBBrush, NtGdiCreateDIBSection, + NtGdiCreateDIBitmapInternal, NtGdiCreateEllipticRgn, NtGdiCreateHalftonePalette, NtGdiCreateHatchBrushInternal, @@ -99,6 +100,7 @@ static void * const syscalls[] = NtGdiGetDCDword, NtGdiGetDCObject, NtGdiGetDCPoint, + NtGdiGetDIBitsInternal, NtGdiGetFontFileData, NtGdiGetFontFileInfo, NtGdiGetNearestPaletteIndex, @@ -139,6 +141,7 @@ static void * const syscalls[] = NtGdiSetBitmapDimension, NtGdiSetBrushOrg, NtGdiSetColorAdjustment, + NtGdiSetDIBitsToDeviceInternal, NtGdiSetMagicColors, NtGdiSetMetaRgn, NtGdiSetPixel, @@ -149,6 +152,7 @@ static void * const syscalls[] = NtGdiStartDoc, NtGdiStartPage, NtGdiStretchBlt, + NtGdiStretchDIBitsInternal, NtGdiStrokeAndFillPath, NtGdiStrokePath, NtGdiSwapBuffers, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 9d1e445bfb1..6690da46537 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -149,7 +149,7 @@ @ stdcall NtGdiCreateCompatibleDC(long) @ stdcall -syscall NtGdiCreateDIBBrush(ptr long long long long ptr) @ stdcall -syscall NtGdiCreateDIBSection(long long long ptr long long long long ptr) -@ stdcall NtGdiCreateDIBitmapInternal(long long long long ptr ptr long long long long long) +@ stdcall -syscall NtGdiCreateDIBitmapInternal(long long long long ptr ptr long long long long long) @ stdcall -syscall NtGdiCreateEllipticRgn(long long long long) @ stdcall -syscall NtGdiCreateHalftonePalette(long) @ stdcall -syscall NtGdiCreateHatchBrushInternal(long long long) @@ -466,7 +466,7 @@ @ stdcall -syscall NtGdiGetDCObject(long long) @ stdcall -syscall NtGdiGetDCPoint(long long ptr) @ stub NtGdiGetDCforBitmap -@ stdcall NtGdiGetDIBitsInternal(long long long long ptr ptr long long long) +@ stdcall -syscall NtGdiGetDIBitsInternal(long long long long ptr ptr long long long) @ stdcall NtGdiGetDeviceCaps(long long) @ stub NtGdiGetDeviceCapsAll @ stdcall NtGdiGetDeviceGammaRamp(long ptr) @@ -597,7 +597,7 @@ @ stdcall -syscall NtGdiSetBrushOrg(long long long ptr) @ stdcall -syscall NtGdiSetColorAdjustment(long ptr) @ stub NtGdiSetColorSpace -@ stdcall NtGdiSetDIBitsToDeviceInternal(long long long long long long long long long ptr ptr long long long long long) +@ stdcall -syscall NtGdiSetDIBitsToDeviceInternal(long long long long long long long long long ptr ptr long long long long long) @ stdcall NtGdiSetDeviceGammaRamp(ptr ptr) @ stub NtGdiSetFontEnumeration @ stub NtGdiSetFontXform @@ -621,7 +621,7 @@ @ stdcall -syscall NtGdiStartDoc(long ptr ptr long) @ stdcall -syscall NtGdiStartPage(long) @ stdcall -syscall NtGdiStretchBlt(long long long long long long long long long long long long) -@ stdcall NtGdiStretchDIBitsInternal(long long long long long long long long long ptr ptr long long long long long) +@ stdcall -syscall NtGdiStretchDIBitsInternal(long long long long long long long long long ptr ptr long long long long long) @ stdcall -syscall NtGdiStrokeAndFillPath(long) @ stdcall -syscall NtGdiStrokePath(long) @ stdcall -syscall NtGdiSwapBuffers(long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index d5415092232..6a045dbf0b1 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -36,10 +36,6 @@ struct unix_funcs { /* win32u functions */ HDC (WINAPI *pNtGdiCreateCompatibleDC)( HDC hdc ); - HBITMAP (WINAPI *pNtGdiCreateDIBitmapInternal)( HDC hdc, INT width, INT height, DWORD init, - const void *bits, const BITMAPINFO *data, - UINT coloruse, UINT max_info, UINT max_bits, - ULONG flags, HANDLE xform ); HDC (WINAPI *pNtGdiCreateMetafileDC)( HDC hdc ); BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj ); LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries, @@ -61,9 +57,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiGetCharWidthW)( HDC hdc, UINT first_char, UINT last_char, WCHAR *chars, ULONG flags, void *buffer ); BOOL (WINAPI *pNtGdiGetCharWidthInfo)( HDC hdc, struct char_width_info *info ); - INT (WINAPI *pNtGdiGetDIBitsInternal)( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines, - void *bits, BITMAPINFO *info, UINT coloruse, - UINT max_bits, UINT max_info ); INT (WINAPI *pNtGdiGetDeviceCaps)( HDC hdc, INT cap ); BOOL (WINAPI *pNtGdiGetDeviceGammaRamp)( HDC hdc, void *ptr ); DWORD (WINAPI *pNtGdiGetFontData)( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length ); @@ -97,19 +90,9 @@ struct unix_funcs HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle ); HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle ); UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags ); - INT (WINAPI *pNtGdiSetDIBitsToDeviceInternal)( HDC hdc, INT x_dst, INT y_dst, DWORD cx, - DWORD cy, INT x_src, INT y_src, UINT startscan, - UINT lines, const void *bits, const BITMAPINFO *bmi, - UINT coloruse, UINT max_bits, UINT max_info, - BOOL xform_coords, HANDLE xform ); BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr ); DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout ); UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use ); - INT (WINAPI *pNtGdiStretchDIBitsInternal)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, - INT height_dst, INT x_src, INT y_src, INT width_src, - INT height_src, const void *bits, const BITMAPINFO *bmi, - UINT coloruse, DWORD rop, UINT max_info, UINT max_bits, - HANDLE xform ); BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 7f2dae040cf..dc3733dc90e 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -30,16 +30,6 @@ HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc ) return unix_funcs->pNtGdiCreateCompatibleDC( hdc ); }
-HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWORD init, - const void *bits, const BITMAPINFO *data, - UINT coloruse, UINT max_info, UINT max_bits, - ULONG flags, HANDLE xform ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiCreateDIBitmapInternal( hdc, width, height, init, bits, data, - coloruse, max_info, max_bits, flags, xform ); -} - HDC WINAPI NtGdiCreateMetafileDC( HDC hdc ) { if (!unix_funcs) return 0; @@ -144,15 +134,6 @@ BOOL WINAPI NtGdiGetCharWidthInfo( HDC hdc, struct char_width_info *info ) return unix_funcs->pNtGdiGetCharWidthInfo( hdc, info ); }
-INT WINAPI NtGdiGetDIBitsInternal( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines, - void *bits, BITMAPINFO *info, UINT coloruse, - UINT max_bits, UINT max_info ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiGetDIBitsInternal( hdc, hbitmap, startscan, lines, bits, info, coloruse, - max_bits, max_info ); -} - INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap ) { if (!unix_funcs) return 0; @@ -321,18 +302,6 @@ UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags ) return unix_funcs->pNtGdiSetBoundsRect( hdc, rect, flags ); }
-INT WINAPI NtGdiSetDIBitsToDeviceInternal( HDC hdc, INT x_dst, INT y_dst, DWORD cx, - DWORD cy, INT x_src, INT y_src, UINT startscan, - UINT lines, const void *bits, const BITMAPINFO *bmi, - UINT coloruse, UINT max_bits, UINT max_info, - BOOL xform_coords, HANDLE xform ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiSetDIBitsToDeviceInternal( hdc, x_dst, y_dst, cx, cy, x_src, y_src, - startscan, lines, bits, bmi, coloruse, - max_bits, max_info, xform_coords, xform ); -} - BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr ) { if (!unix_funcs) return FALSE; @@ -351,18 +320,6 @@ UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use ) return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use ); }
-INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT x_dst, INT y_dst, INT width_dst, - INT height_dst, INT x_src, INT y_src, INT width_src, - INT height_src, const void *bits, const BITMAPINFO *bmi, - UINT coloruse, DWORD rop, UINT max_info, UINT max_bits, - HANDLE xform ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiStretchDIBitsInternal( hdc, x_dst, y_dst, width_dst, height_dst, - x_src, y_src, width_src, height_src, bits, bmi, - coloruse, rop, max_info, max_bits, xform ); -} - BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 36737b23e61..d0dfbccaad1 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -249,6 +249,25 @@ NTSTATUS WINAPI wow64_NtGdiCreateDIBSection( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtGdiCreateDIBitmapInternal( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT width = get_ulong( &args ); + INT height = get_ulong( &args ); + DWORD init = get_ulong( &args ); + const void *bits = get_ptr( &args ); + const BITMAPINFO *data = get_ptr( &args ); + UINT coloruse = get_ulong( &args ); + UINT max_info = get_ulong( &args ); + UINT max_bits = get_ulong( &args ); + ULONG flags = get_ulong( &args ); + HANDLE xform = get_handle( &args ); + + HBITMAP ret = NtGdiCreateDIBitmapInternal( hdc, width, height, init, bits, data, + coloruse, max_info, max_bits, flags, xform ); + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtGdiCreateEllipticRgn( UINT *args ) { INT left = get_ulong( &args ); @@ -870,6 +889,22 @@ NTSTATUS WINAPI wow64_NtGdiGetDCPoint( UINT *args ) return NtGdiGetDCPoint( hdc, method, result ); }
+NTSTATUS WINAPI wow64_NtGdiGetDIBitsInternal( UINT *args ) +{ + HDC hdc = get_handle( &args ); + HBITMAP hbitmap = get_handle( &args ); + UINT startscan = get_ulong( &args ); + UINT lines = get_ulong( &args ); + void *bits = get_ptr( &args ); + BITMAPINFO *info = get_ptr( &args ); + UINT coloruse = get_ulong( &args ); + UINT max_bits = get_ulong( &args ); + UINT max_info = get_ulong( &args ); + + return NtGdiGetDIBitsInternal( hdc, hbitmap, startscan, lines, bits, info, coloruse, + max_bits, max_info ); +} + NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args ) { DWORD instance_id = get_ulong( &args ); @@ -1280,6 +1315,30 @@ NTSTATUS WINAPI wow64_NtGdiSetColorAdjustment( UINT *args ) return NtGdiSetColorAdjustment( hdc, ca ); }
+NTSTATUS WINAPI wow64_NtGdiSetDIBitsToDeviceInternal( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_dst = get_ulong( &args ); + INT y_dst = get_ulong( &args ); + DWORD cx = get_ulong( &args ); + DWORD cy = get_ulong( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + UINT startscan = get_ulong( &args ); + UINT lines = get_ulong( &args ); + const void *bits = get_ptr( &args ); + const BITMAPINFO *bmi = get_ptr( &args ); + UINT coloruse = get_ulong( &args ); + UINT max_bits = get_ulong( &args ); + UINT max_info = get_ulong( &args ); + BOOL xform_coords = get_ulong( &args ); + HANDLE xform = get_handle( &args ); + + return NtGdiSetDIBitsToDeviceInternal( hdc, x_dst, y_dst, cx, cy, x_src, y_src, + startscan, lines, bits, bmi, coloruse, + max_bits, max_info, xform_coords, xform ); +} + NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1395,6 +1454,30 @@ NTSTATUS WINAPI wow64_NtGdiStretchBlt( UINT *args ) x_src, y_src, width_src, height_src, rop, bk_color ); }
+NTSTATUS WINAPI wow64_NtGdiStretchDIBitsInternal( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_dst = get_ulong( &args ); + INT y_dst = get_ulong( &args ); + INT width_dst = get_ulong( &args ); + INT height_dst = get_ulong( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + INT width_src = get_ulong( &args ); + INT height_src = get_ulong( &args ); + const void *bits = get_ptr( &args ); + const BITMAPINFO *bmi = get_ptr( &args ); + UINT coloruse = get_ulong( &args ); + DWORD rop = get_ulong( &args ); + UINT max_info = get_ulong( &args ); + UINT max_bits = get_ulong( &args ); + HANDLE xform = get_handle( &args ); + + return NtGdiStretchDIBitsInternal( hdc, x_dst, y_dst, width_dst, height_dst, + x_src, y_src, width_src, height_src, bits, bmi, + coloruse, rop, max_info, max_bits, xform ); +} + NTSTATUS WINAPI wow64_NtGdiStrokeAndFillPath( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index ea9e5043b1a..7425b59bcdd 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -39,6 +39,7 @@ SYSCALL_ENTRY( NtGdiCreateCompatibleBitmap ) \ SYSCALL_ENTRY( NtGdiCreateDIBBrush ) \ SYSCALL_ENTRY( NtGdiCreateDIBSection ) \ + SYSCALL_ENTRY( NtGdiCreateDIBitmapInternal ) \ SYSCALL_ENTRY( NtGdiCreateEllipticRgn ) \ SYSCALL_ENTRY( NtGdiCreateHalftonePalette ) \ SYSCALL_ENTRY( NtGdiCreateHatchBrushInternal ) \ @@ -85,6 +86,7 @@ SYSCALL_ENTRY( NtGdiGetDCDword ) \ SYSCALL_ENTRY( NtGdiGetDCObject ) \ SYSCALL_ENTRY( NtGdiGetDCPoint ) \ + SYSCALL_ENTRY( NtGdiGetDIBitsInternal ) \ SYSCALL_ENTRY( NtGdiGetFontFileData ) \ SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \ SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \ @@ -125,6 +127,7 @@ SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \ SYSCALL_ENTRY( NtGdiSetBrushOrg ) \ SYSCALL_ENTRY( NtGdiSetColorAdjustment ) \ + SYSCALL_ENTRY( NtGdiSetDIBitsToDeviceInternal ) \ SYSCALL_ENTRY( NtGdiSetMagicColors ) \ SYSCALL_ENTRY( NtGdiSetMetaRgn ) \ SYSCALL_ENTRY( NtGdiSetPixel ) \ @@ -135,6 +138,7 @@ SYSCALL_ENTRY( NtGdiStartDoc ) \ SYSCALL_ENTRY( NtGdiStartPage ) \ SYSCALL_ENTRY( NtGdiStretchBlt ) \ + SYSCALL_ENTRY( NtGdiStretchDIBitsInternal ) \ SYSCALL_ENTRY( NtGdiStrokeAndFillPath ) \ SYSCALL_ENTRY( NtGdiStrokePath ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \