Jacek Caban : win32u: Use syscall interface for some path functions.
Alexandre Julliard
julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021
Module: wine
Branch: master
Commit: 3d978e4c4e2d39cac7ad1fa1221548fe4cd3c492
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3d978e4c4e2d39cac7ad1fa1221548fe4cd3c492
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Oct 12 15:28:52 2021 +0200
win32u: Use syscall interface for some path 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 | 3 ---
dlls/win32u/syscall.c | 3 +++
dlls/win32u/win32u.spec | 6 +++---
dlls/win32u/win32u_private.h | 3 ---
dlls/win32u/wrappers.c | 15 ---------------
dlls/wow64win/gdi.c | 24 ++++++++++++++++++++++++
dlls/wow64win/syscall.h | 3 +++
7 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c
index 4a6af99c94a..4f6304ad883 100644
--- a/dlls/win32u/gdiobj.c
+++ b/dlls/win32u/gdiobj.c
@@ -1107,7 +1107,6 @@ static struct unix_funcs unix_funcs =
NtGdiExtSelectClipRgn,
NtGdiFillPath,
NtGdiFillRgn,
- NtGdiFlattenPath,
NtGdiFontIsLinked,
NtGdiFrameRgn,
NtGdiGetAndSetDCDword,
@@ -1126,7 +1125,6 @@ static struct unix_funcs unix_funcs =
NtGdiGetKerningPairs,
NtGdiGetNearestColor,
NtGdiGetOutlineTextMetricsInternalW,
- NtGdiGetPath,
NtGdiGetPixel,
NtGdiGetRandomRgn,
NtGdiGetRasterizerCaps,
@@ -1147,7 +1145,6 @@ static struct unix_funcs unix_funcs =
NtGdiOffsetClipRgn,
NtGdiOpenDCW,
NtGdiPatBlt,
- NtGdiPathToRegion,
NtGdiPlgBlt,
NtGdiPolyDraw,
NtGdiPolyPolyDraw,
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index 99db48f27ec..e1c94b0c210 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -55,6 +55,7 @@ static void * const syscalls[] =
NtGdiEqualRgn,
NtGdiExtCreateRegion,
NtGdiExtGetObjectW,
+ NtGdiFlattenPath,
NtGdiFlush,
NtGdiGetBitmapBits,
NtGdiGetBitmapDimension,
@@ -63,12 +64,14 @@ static void * const syscalls[] =
NtGdiGetFontFileData,
NtGdiGetFontFileInfo,
NtGdiGetNearestPaletteIndex,
+ NtGdiGetPath,
NtGdiGetRegionData,
NtGdiGetRgnBox,
NtGdiGetSystemPaletteUse,
NtGdiGetTransform,
NtGdiHfontCreate,
NtGdiOffsetRgn,
+ NtGdiPathToRegion,
NtGdiPtInRegion,
NtGdiRectInRegion,
NtGdiRemoveFontMemResourceEx,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 8bd29d33f8b..a2b864f65bb 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -435,7 +435,7 @@
@ stub NtGdiFONTOBJ_vGetInfo
@ stdcall NtGdiFillPath(long)
@ stdcall NtGdiFillRgn(long long long)
-@ stdcall NtGdiFlattenPath(long)
+@ stdcall -syscall NtGdiFlattenPath(long)
@ stdcall -syscall NtGdiFlush()
@ stdcall NtGdiFontIsLinked(long)
@ stub NtGdiForceUFIMapping
@@ -497,7 +497,7 @@
@ stub NtGdiGetOPMRandomNumber
@ stub NtGdiGetObjectBitmapHandle
@ stdcall NtGdiGetOutlineTextMetricsInternalW(long long ptr long)
-@ stdcall NtGdiGetPath(long ptr ptr long)
+@ stdcall -syscall NtGdiGetPath(long ptr ptr long)
@ stub NtGdiGetPerBandInfo
@ stub NtGdiGetPhysicalMonitorDescription
@ stub NtGdiGetPhysicalMonitors
@@ -554,7 +554,7 @@
@ stub NtGdiPATHOBJ_vEnumStartClipLines
@ stub NtGdiPATHOBJ_vGetBounds
@ stdcall NtGdiPatBlt(long long long long long long)
-@ stdcall NtGdiPathToRegion(long)
+@ stdcall -syscall NtGdiPathToRegion(long)
@ stdcall NtGdiPlgBlt(long ptr long long long long long long long long long)
@ stdcall NtGdiPolyDraw(long ptr ptr long)
@ stub NtGdiPolyPatBlt
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index 1cf7c66b1b0..e7bfe13b2df 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -99,7 +99,6 @@ struct unix_funcs
INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode );
BOOL (WINAPI *pNtGdiFillPath)( HDC hdc );
BOOL (WINAPI *pNtGdiFillRgn)( HDC hdc, HRGN hrgn, HBRUSH hbrush );
- BOOL (WINAPI *pNtGdiFlattenPath)( HDC hdc );
BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc );
BOOL (WINAPI *pNtGdiFrameRgn)( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height );
BOOL (WINAPI *pNtGdiGetAndSetDCDword)( HDC hdc, UINT method, DWORD value, DWORD *result );
@@ -126,7 +125,6 @@ struct unix_funcs
COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color );
UINT (WINAPI *pNtGdiGetOutlineTextMetricsInternalW)( HDC hdc, UINT cbData,
OUTLINETEXTMETRICW *otm, ULONG opts );
- INT (WINAPI *pNtGdiGetPath)( HDC hdc, POINT *points, BYTE *types, INT size );
COLORREF (WINAPI *pNtGdiGetPixel)( HDC hdc, INT x, INT y );
INT (WINAPI *pNtGdiGetRandomRgn)( HDC hdc, HRGN region, INT code );
BOOL (WINAPI *pNtGdiGetRasterizerCaps)( RASTERIZER_STATUS *status, UINT size );
@@ -153,7 +151,6 @@ struct unix_funcs
UNICODE_STRING *output, ULONG type, BOOL is_display,
HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev );
BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop );
- HRGN (WINAPI *pNtGdiPathToRegion)( HDC hdc );
BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src,
INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask,
DWORD bk_color );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c
index e4bfe6f172f..957646dc7c3 100644
--- a/dlls/win32u/wrappers.c
+++ b/dlls/win32u/wrappers.c
@@ -195,11 +195,6 @@ BOOL WINAPI NtGdiFillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush )
return unix_funcs->pNtGdiFillRgn( hdc, hrgn, hbrush );
}
-BOOL WINAPI NtGdiFlattenPath( HDC hdc )
-{
- return unix_funcs->pNtGdiFlattenPath( hdc );
-}
-
BOOL WINAPI NtGdiFontIsLinked( HDC hdc )
{
return unix_funcs->pNtGdiFontIsLinked( hdc );
@@ -299,11 +294,6 @@ UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData,
return unix_funcs->pNtGdiGetOutlineTextMetricsInternalW( hdc, cbData, otm, opts );
}
-INT WINAPI NtGdiGetPath( HDC hdc, POINT *points, BYTE *types, INT size )
-{
- return unix_funcs->pNtGdiGetPath( hdc, points, types, size );
-}
-
COLORREF WINAPI NtGdiGetPixel( HDC hdc, INT x, INT y )
{
return unix_funcs->pNtGdiGetPixel( hdc, x, y );
@@ -412,11 +402,6 @@ BOOL WINAPI NtGdiPatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWOR
return unix_funcs->pNtGdiPatBlt( hdc, left, top, width, height, rop );
}
-HRGN WINAPI NtGdiPathToRegion( HDC hdc )
-{
- return unix_funcs->pNtGdiPathToRegion( hdc );
-}
-
BOOL WINAPI NtGdiPlgBlt( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src,
INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask,
DWORD bk_color )
diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c
index 5f32a65c2fd..daba653f214 100644
--- a/dlls/wow64win/gdi.c
+++ b/dlls/wow64win/gdi.c
@@ -511,6 +511,30 @@ NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args )
return NtGdiSetMagicColors( hdc, magic, index );
}
+NTSTATUS WINAPI wow64_NtGdiGetPath( UINT *args )
+{
+ HDC hdc = get_handle( &args );
+ POINT *points = get_ptr( &args );
+ BYTE *types = get_ptr( &args );
+ INT size = get_ulong( &args );
+
+ return NtGdiGetPath( hdc, points, types, size );
+}
+
+NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args )
+{
+ HDC hdc = get_handle( &args );
+
+ return HandleToUlong( NtGdiPathToRegion( hdc ));
+}
+
+NTSTATUS WINAPI wow64_NtGdiFlattenPath( UINT *args )
+{
+ HDC hdc = get_handle( &args );
+
+ return NtGdiFlattenPath( hdc );
+}
+
NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args )
{
return NtGdiFlush();
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index 143fd1f97ae..a5a38548f5e 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -43,6 +43,7 @@
SYSCALL_ENTRY( NtGdiEqualRgn ) \
SYSCALL_ENTRY( NtGdiExtCreateRegion ) \
SYSCALL_ENTRY( NtGdiExtGetObjectW ) \
+ SYSCALL_ENTRY( NtGdiFlattenPath ) \
SYSCALL_ENTRY( NtGdiFlush ) \
SYSCALL_ENTRY( NtGdiGetBitmapBits ) \
SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \
@@ -51,12 +52,14 @@
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \
+ SYSCALL_ENTRY( NtGdiGetPath ) \
SYSCALL_ENTRY( NtGdiGetRegionData ) \
SYSCALL_ENTRY( NtGdiGetRgnBox ) \
SYSCALL_ENTRY( NtGdiGetSystemPaletteUse ) \
SYSCALL_ENTRY( NtGdiGetTransform ) \
SYSCALL_ENTRY( NtGdiHfontCreate ) \
SYSCALL_ENTRY( NtGdiOffsetRgn ) \
+ SYSCALL_ENTRY( NtGdiPathToRegion ) \
SYSCALL_ENTRY( NtGdiPtInRegion ) \
SYSCALL_ENTRY( NtGdiRectInRegion ) \
SYSCALL_ENTRY( NtGdiRemoveFontMemResourceEx ) \
More information about the wine-cvs
mailing list