Jacek Caban : win32u: Use syscall interface for some mapping functions.
Alexandre Julliard
julliard at winehq.org
Mon Oct 11 15:41:36 CDT 2021
Module: wine
Branch: master
Commit: 21009822a38ad4b670cdfdb2c0719126af30bda6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=21009822a38ad4b670cdfdb2c0719126af30bda6
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Oct 11 18:50:37 2021 +0200
win32u: Use syscall interface for some mapping functions.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/win32u/gdiobj.c | 2 --
dlls/win32u/syscall.c | 2 ++
dlls/win32u/win32u.spec | 4 ++--
dlls/win32u/win32u_private.h | 4 ----
dlls/win32u/wrappers.c | 12 ------------
dlls/wow64win/gdi.c | 22 ++++++++++++++++++++++
dlls/wow64win/syscall.h | 4 +++-
7 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c
index 046ccffdc17..0c355f4d94c 100644
--- a/dlls/win32u/gdiobj.c
+++ b/dlls/win32u/gdiobj.c
@@ -1176,7 +1176,6 @@ static struct unix_funcs unix_funcs =
NtGdiSetMagicColors,
NtGdiSetPixel,
NtGdiSetSystemPaletteUse,
- NtGdiSetVirtualResolution,
NtGdiStartDoc,
NtGdiStartPage,
NtGdiStretchBlt,
@@ -1184,7 +1183,6 @@ static struct unix_funcs unix_funcs =
NtGdiStrokeAndFillPath,
NtGdiStrokePath,
NtGdiTransparentBlt,
- NtGdiTransformPoints,
NtGdiUnrealizeObject,
NtGdiUpdateColors,
NtGdiWidenPath,
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index 5f664da96c7..984e7b13e7a 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -78,7 +78,9 @@ static void * const syscalls[] =
NtGdiSetPixelFormat,
NtGdiSetRectRgn,
NtGdiSetTextJustification,
+ NtGdiSetVirtualResolution,
NtGdiSwapBuffers,
+ NtGdiTransformPoints,
};
static BYTE arguments[ARRAY_SIZE(syscalls)];
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 02030d15418..8874894d4e7 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -617,7 +617,7 @@
@ stdcall NtGdiSetSystemPaletteUse(long long)
@ stdcall -syscall NtGdiSetTextJustification(long long long)
@ stub NtGdiSetUMPDSandboxState
-@ stdcall NtGdiSetVirtualResolution(long long long long long)
+@ stdcall -syscall NtGdiSetVirtualResolution(long long long long long)
@ stdcall NtGdiStartDoc(long ptr ptr long)
@ stdcall NtGdiStartPage(long)
@ stdcall NtGdiStretchBlt(long long long long long long long long long long long long)
@@ -625,7 +625,7 @@
@ stdcall NtGdiStrokeAndFillPath(long)
@ stdcall NtGdiStrokePath(long)
@ stdcall -syscall NtGdiSwapBuffers(long)
-@ stdcall NtGdiTransformPoints(long ptr ptr long long)
+@ stdcall -syscall NtGdiTransformPoints(long ptr ptr long long)
@ stdcall NtGdiTransparentBlt(long long long long long long long long long long long)
@ stub NtGdiUMPDEngFreeUserMem
@ stub NtGdiUnloadPrinterDriver
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index c4e32ced460..ff956dbf167 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -193,8 +193,6 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiSetMagicColors)( HDC hdc, DWORD magic, ULONG index );
COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color );
UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use );
- BOOL (WINAPI *pNtGdiSetVirtualResolution)( HDC hdc, DWORD horz_res, DWORD vert_res,
- DWORD horz_size, DWORD vert_size );
INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job );
INT (WINAPI *pNtGdiStartPage)( HDC hdc );
BOOL (WINAPI *pNtGdiStretchBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
@@ -210,8 +208,6 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiTransparentBlt)( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst,
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
UINT color );
- BOOL (WINAPI *pNtGdiTransformPoints)( HDC hdc, const POINT *points_in, POINT *points_out,
- INT count, UINT mode );
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c
index 3854ba9b6f8..dea3e072a3d 100644
--- a/dlls/win32u/wrappers.c
+++ b/dlls/win32u/wrappers.c
@@ -571,12 +571,6 @@ UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use )
return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use );
}
-BOOL WINAPI NtGdiSetVirtualResolution( HDC hdc, DWORD horz_res, DWORD vert_res,
- DWORD horz_size, DWORD vert_size )
-{
- return unix_funcs->pNtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size );
-}
-
INT WINAPI NtGdiStartDoc( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job )
{
return unix_funcs->pNtGdiStartDoc( hdc, doc, banding, job );
@@ -624,12 +618,6 @@ BOOL WINAPI NtGdiTransparentBlt( HDC hdc, int x_dst, int y_dst, int width_dst, i
x_src, y_src, width_src, height_src, color );
}
-BOOL WINAPI NtGdiTransformPoints( HDC hdc, const POINT *points_in, POINT *points_out,
- INT count, UINT mode )
-{
- return unix_funcs->pNtGdiTransformPoints( hdc, points_in, points_out, count, mode );
-}
-
BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj )
{
return unix_funcs->pNtGdiUnrealizeObject( obj );
diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c
index b113179f432..42a13cc3676 100644
--- a/dlls/wow64win/gdi.c
+++ b/dlls/wow64win/gdi.c
@@ -450,6 +450,28 @@ NTSTATUS WINAPI wow64_NtGdiSetColorAdjustment( UINT *args )
return NtGdiSetColorAdjustment( hdc, ca );
}
+NTSTATUS WINAPI wow64_NtGdiSetVirtualResolution( UINT *args )
+{
+ HDC hdc = get_handle( &args );
+ DWORD horz_res = get_ulong( &args );
+ DWORD vert_res = get_ulong( &args );
+ DWORD horz_size = get_ulong( &args );
+ DWORD vert_size = get_ulong( &args );
+
+ return NtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size );
+}
+
+NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args )
+{
+ HDC hdc = get_handle( &args );
+ const POINT *points_in = get_ptr( &args );
+ POINT *points_out = get_ptr( &args );
+ INT count = get_ulong( &args );
+ UINT mode = get_ulong( &args );
+
+ return NtGdiTransformPoints( hdc, points_in, points_out, count, mode );
+}
+
NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args )
{
return NtGdiFlush();
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index fd8b9f95365..c5f04b240bd 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -66,6 +66,8 @@
SYSCALL_ENTRY( NtGdiSetPixelFormat ) \
SYSCALL_ENTRY( NtGdiSetRectRgn ) \
SYSCALL_ENTRY( NtGdiSetTextJustification ) \
- SYSCALL_ENTRY( NtGdiSwapBuffers )
+ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
+ SYSCALL_ENTRY( NtGdiSwapBuffers ) \
+ SYSCALL_ENTRY( NtGdiTransformPoints )
#endif /* __WOW64WIN_SYSCALL_H */
More information about the wine-cvs
mailing list