gdi32: Use NtGdiWidenPath for WidenPath.

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:
Jacek Caban 2021-08-19 10:24:21 +02:00 committed by Alexandre Julliard
parent b048e4e0df
commit 37a5c8b9f3
16 changed files with 29 additions and 43 deletions

View File

@ -714,7 +714,6 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_StrokeAndFillPath, /* pStrokeAndFillPath */
dibdrv_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
dibdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
@ -1281,7 +1280,6 @@ static const struct gdi_dc_funcs window_driver =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
windrv_wine_get_wgl_driver, /* wine_get_wgl_driver */

View File

@ -920,7 +920,6 @@ const struct gdi_dc_funcs null_driver =
nulldrv_StrokeAndFillPath, /* pStrokeAndFillPath */
nulldrv_StrokePath, /* pStrokePath */
nulldrv_UnrealizePalette, /* pUnrealizePalette */
nulldrv_WidenPath, /* pWidenPath */
nulldrv_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */
nulldrv_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
nulldrv_wine_get_wgl_driver, /* wine_get_wgl_driver */

View File

@ -395,14 +395,13 @@ BOOL EMFDC_SelectClipPath( DC_ATTR *dc_attr, INT mode )
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
}
BOOL CDECL EMFDRV_WidenPath( PHYSDEV dev )
BOOL EMFDC_WidenPath( DC_ATTR *dc_attr )
{
EMRWIDENPATH emr;
emr.emr.iType = EMR_WIDENPATH;
emr.emr.nSize = sizeof(emr);
return EMFDRV_WriteRecord( dev, &emr.emr );
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
}
INT CDECL EMFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)

View File

@ -104,7 +104,6 @@ extern INT CDECL EMFDRV_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT
const void *bits, BITMAPINFO *info, UINT wUsage, DWORD dwRop ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_StrokeAndFillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_StrokePath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_WidenPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
#endif /* __WINE_METAFILEDRV_H */

View File

@ -128,7 +128,6 @@ static const struct gdi_dc_funcs emfdrv_driver =
EMFDRV_StrokeAndFillPath, /* pStrokeAndFillPath */
EMFDRV_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
EMFDRV_WidenPath, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */

View File

@ -3905,7 +3905,6 @@ const struct gdi_dc_funcs font_driver =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */

View File

@ -219,5 +219,6 @@ extern BOOL EMFDC_StretchDIBits( DC_ATTR *dc_attr, INT x_dst, INT y_dst, INT wid
UINT coloruse, DWORD rop ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_StrokeAndFillPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_StrokePath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_WidenPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
#endif /* __WINE_GDI_PRIVATE_H */

View File

@ -1567,6 +1567,18 @@ BOOL WINAPI FlattenPath( HDC hdc )
return NtGdiFlattenPath( hdc );
}
/***********************************************************************
* WidenPath (GDI32.@)
*/
BOOL WINAPI WidenPath( HDC hdc )
{
DC_ATTR *dc_attr;
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
if (dc_attr->emf && !EMFDC_WidenPath( dc_attr )) return FALSE;
return NtGdiWidenPath( hdc );
}
/***********************************************************************
* SelectClipPath (GDI32.@)
*/

View File

@ -586,7 +586,6 @@ extern INT CDECL nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT wi
BITMAPINFO *info, UINT coloruse, DWORD rop ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_StrokeAndFillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_StrokePath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_WidenPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
static inline DC *get_nulldrv_dc( PHYSDEV dev )
{

View File

@ -1937,21 +1937,25 @@ BOOL WINAPI NtGdiStrokePath( HDC hdc )
/*******************************************************************
* WidenPath [GDI32.@]
*
*
* NtGdiWidenPath (win32u.@)
*/
BOOL WINAPI WidenPath(HDC hdc)
BOOL WINAPI NtGdiWidenPath( HDC hdc )
{
struct gdi_path *path;
BOOL ret = FALSE;
DC *dc = get_dc_ptr( hdc );
DC *dc;
if (dc)
if (!(dc = get_dc_ptr( hdc ))) return FALSE;
if (!dc->path) SetLastError( ERROR_CAN_NOT_COMPLETE );
else if ((path = PATH_WidenPath( dc )))
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pWidenPath );
ret = physdev->funcs->pWidenPath( physdev );
release_dc_ptr( dc );
free_gdi_path( dc->path );
dc->path = path;
ret = TRUE;
}
release_dc_ptr( dc );
return ret;
}
@ -2023,22 +2027,6 @@ BOOL CDECL nulldrv_StrokePath( PHYSDEV dev )
return TRUE;
}
BOOL CDECL nulldrv_WidenPath( PHYSDEV dev )
{
DC *dc = get_nulldrv_dc( dev );
struct gdi_path *path;
if (!dc->path)
{
SetLastError( ERROR_CAN_NOT_COMPLETE );
return FALSE;
}
if (!(path = PATH_WidenPath( dc ))) return FALSE;
free_gdi_path( dc->path );
dc->path = path;
return TRUE;
}
const struct gdi_dc_funcs path_driver =
{
NULL, /* pAbortDoc */
@ -2133,7 +2121,6 @@ const struct gdi_dc_funcs path_driver =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */

View File

@ -375,7 +375,6 @@ static const struct gdi_dc_funcs android_drv_funcs =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
ANDROID_wine_get_wgl_driver, /* wine_get_wgl_driver */

View File

@ -355,7 +355,6 @@ static const struct gdi_dc_funcs macdrv_funcs =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
macdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */

View File

@ -869,7 +869,6 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_StrokeAndFillPath, /* pStrokeAndFillPath */
PSDRV_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */

View File

@ -434,7 +434,6 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_StrokeAndFillPath, /* pStrokeAndFillPath */
X11DRV_StrokePath, /* pStrokePath */
X11DRV_UnrealizePalette, /* pUnrealizePalette */
NULL, /* pWidenPath */
X11DRV_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */
X11DRV_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */

View File

@ -2246,7 +2246,6 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */

View File

@ -159,7 +159,6 @@ struct gdi_dc_funcs
BOOL (CDECL *pStrokeAndFillPath)(PHYSDEV);
BOOL (CDECL *pStrokePath)(PHYSDEV);
BOOL (CDECL *pUnrealizePalette)(HPALETTE);
BOOL (CDECL *pWidenPath)(PHYSDEV);
NTSTATUS (CDECL *pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
NTSTATUS (CDECL *pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *);
struct opengl_funcs * (CDECL *wine_get_wgl_driver)(PHYSDEV,UINT);
@ -170,7 +169,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 62
#define WINE_GDI_DRIVER_VERSION 63
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */