diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index d58d61d3f84..c31845d30a9 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -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 */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index fc42b937fb5..23bfc87a761 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -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 */ diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index 5b88e6e9c13..519c3349743 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -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) diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index 6e0a89495e6..e96093b825b 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -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 */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 1a43392506a..0088ee29609 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -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 */ diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 32b696282f1..8be802af450 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -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 */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 7a7fc2b6fce..969cd324f98 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -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 */ diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index ac33893dfc7..e5d0e711eab 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -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.@) */ diff --git a/dlls/gdi32/ntgdi_private.h b/dlls/gdi32/ntgdi_private.h index 68e98d83fb7..05072962caa 100644 --- a/dlls/gdi32/ntgdi_private.h +++ b/dlls/gdi32/ntgdi_private.h @@ -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 ) { diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index e59c02951ff..3eed8f78c28 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -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 */ diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index 982afc8e991..2067827b871 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -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 */ diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index c55b96c0d1e..42c9998b3fa 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -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 */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 5bfe47f8d20..7b6a8f3d67b 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -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 */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 422fd2eb27b..5f554937501 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -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 */ diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 324776dc869..3dfa64283e0 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -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 */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 3bb36b5441c..641d74ea82e 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -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 */