winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
728 discussions
Start a n
N
ew thread
Alexandre Julliard : wow64: Load the backend cpu dll at process init.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 42dec97d1a54528af832e37e865302295d3e3e89 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42dec97d1a54528af832e37e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 22 13:33:57 2021 +0200 wow64: Load the backend cpu dll at process init. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/syscall.c | 61 +++++++++++++++++++++++++++++++++++++++++++++- dlls/wow64/wow64_private.h | 41 +++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index a4acb8ba646..504580e8717 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -27,10 +27,14 @@ #include "winnt.h" #include "winternl.h" #include "wine/exception.h" +#include "wow64_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wow); +USHORT native_machine = 0; +USHORT current_machine = 0; + void *dummy = RtlUnwind; BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved ) @@ -54,6 +58,55 @@ void __cdecl __wine_spec_unimplemented_stub( const char *module, const char *fun } +/********************************************************************** + * load_cpu_dll + */ +static HMODULE load_cpu_dll(void) +{ + NTSTATUS status; + HMODULE module; + UNICODE_STRING str; + WCHAR path[MAX_PATH]; + const WCHAR *dir, *name; + + switch (current_machine) + { + case IMAGE_FILE_MACHINE_I386: + name = (native_machine == IMAGE_FILE_MACHINE_ARM64 ? L"xtajit.dll" : L"wow64cpu.dll"); + break; + case IMAGE_FILE_MACHINE_ARM: + name = L"wowarmhw.dll"; + break; + default: + ERR( "unsupported machine %04x\n", current_machine ); + RtlExitUserProcess( 1 ); + } + + dir = get_machine_wow64_dir( IMAGE_FILE_MACHINE_TARGET_HOST ); + + swprintf( path, MAX_PATH, L"%s\\%s", dir, name ); + RtlInitUnicodeString( &str, path ); + if ((status = LdrLoadDll( NULL, 0, &str, &module ))) + { + ERR( "failed to load CPU dll %x\n", status ); + NtTerminateProcess( GetCurrentProcess(), status ); + } + return module; +} + + +/********************************************************************** + * process_init + */ +static void process_init(void) +{ + RtlWow64GetProcessMachines( GetCurrentProcess(), ¤t_machine, &native_machine ); + if (!current_machine) current_machine = native_machine; + + load_cpu_dll(); +} + + /********************************************************************** * Wow64SystemServiceEx (NTDLL.@) */ @@ -69,5 +122,11 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args ) */ void WINAPI Wow64LdrpInitialize( CONTEXT *context ) { - FIXME( "stub\n" ); + static BOOL init_done; + + if (!init_done) + { + init_done = TRUE; + process_init(); + } } diff --git a/dlls/wow64/wow64_private.h b/dlls/wow64/wow64_private.h new file mode 100644 index 00000000000..52cc40566b1 --- /dev/null +++ b/dlls/wow64/wow64_private.h @@ -0,0 +1,41 @@ +/* + * WoW64 private definitions + * + * Copyright 2021 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WOW64_PRIVATE_H +#define __WOW64_PRIVATE_H + +extern USHORT native_machine DECLSPEC_HIDDEN; +extern USHORT current_machine DECLSPEC_HIDDEN; + +/* cf. GetSystemWow64Directory2 */ +static inline const WCHAR *get_machine_wow64_dir( USHORT machine ) +{ + switch (machine) + { + case IMAGE_FILE_MACHINE_TARGET_HOST: return L"\\??\\C:\\windows\\system32"; + case IMAGE_FILE_MACHINE_I386: return L"\\??\\C:\\windows\\syswow64"; + case IMAGE_FILE_MACHINE_ARMNT: return L"\\??\\C:\\windows\\sysarm32"; + case IMAGE_FILE_MACHINE_AMD64: return L"\\??\\C:\\windows\\sysx8664"; + case IMAGE_FILE_MACHINE_ARM64: return L"\\??\\C:\\windows\\sysarm64"; + default: return NULL; + } +} + +#endif /* __WOW64_PRIVATE_H */
1
0
0
0
Alexandre Julliard : wow64: Add stubs for Wow64LdrpInitialize() and Wow64SystemServiceEx().
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: c51682618430027758c037dc27292c5e0436ca0f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c51682618430027758c037dc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 21 15:03:24 2021 +0200 wow64: Add stubs for Wow64LdrpInitialize() and Wow64SystemServiceEx(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/Makefile.in | 6 +++++ dlls/wow64/syscall.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/wow64.spec | 4 +-- 3 files changed, 81 insertions(+), 2 deletions(-) diff --git a/dlls/wow64/Makefile.in b/dlls/wow64/Makefile.in index 9d0618f8e3e..8dc4dac5ba7 100644 --- a/dlls/wow64/Makefile.in +++ b/dlls/wow64/Makefile.in @@ -1,2 +1,8 @@ MODULE = wow64.dll IMPORTLIB = wow64 +IMPORTS = ntdll winecrt0 + +EXTRADLLFLAGS = -nodefaultlibs -mno-cygwin -Wl,--image-base,0x6f000000 + +C_SRCS = \ + syscall.c diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c new file mode 100644 index 00000000000..a4acb8ba646 --- /dev/null +++ b/dlls/wow64/syscall.c @@ -0,0 +1,73 @@ +/* + * WoW64 syscall wrapping + * + * Copyright 2021 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winnt.h" +#include "winternl.h" +#include "wine/exception.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wow); + +void *dummy = RtlUnwind; + +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved ) +{ + if (reason == DLL_PROCESS_ATTACH) LdrDisableThreadCalloutsForDll( inst ); + return TRUE; +} + +void __cdecl __wine_spec_unimplemented_stub( const char *module, const char *function ) +{ + EXCEPTION_RECORD record; + + record.ExceptionCode = EXCEPTION_WINE_STUB; + record.ExceptionFlags = EH_NONCONTINUABLE; + record.ExceptionRecord = NULL; + record.ExceptionAddress = __wine_spec_unimplemented_stub; + record.NumberParameters = 2; + record.ExceptionInformation[0] = (ULONG_PTR)module; + record.ExceptionInformation[1] = (ULONG_PTR)function; + for (;;) RtlRaiseException( &record ); +} + + +/********************************************************************** + * Wow64SystemServiceEx (NTDLL.@) + */ +NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args ) +{ + FIXME( "stub\n" ); + return STATUS_INVALID_SYSTEM_SERVICE; +} + + +/********************************************************************** + * Wow64LdrpInitialize (NTDLL.@) + */ +void WINAPI Wow64LdrpInitialize( CONTEXT *context ) +{ + FIXME( "stub\n" ); +} diff --git a/dlls/wow64/wow64.spec b/dlls/wow64/wow64.spec index f9230ced19a..a477b6b628a 100644 --- a/dlls/wow64/wow64.spec +++ b/dlls/wow64/wow64.spec @@ -10,7 +10,7 @@ @ stub Wow64IsControlFlowGuardEnforced @ stub Wow64IsStackExtentsCheckEnforced @ stub Wow64KiUserCallbackDispatcher -@ stub Wow64LdrpInitialize +@ stdcall Wow64LdrpInitialize(ptr) @ stub Wow64LogPrint @ stub Wow64NotifyUnsimulateComplete @ stub Wow64PassExceptionToGuest @@ -22,6 +22,6 @@ @ stub Wow64ShallowThunkSIZE_T32TO64 @ stub Wow64ShallowThunkSIZE_T64TO32 @ stub Wow64SuspendLocalThread -@ stub Wow64SystemServiceEx +@ stdcall -norelay Wow64SystemServiceEx(long ptr) @ stub Wow64ValidateUserCallTarget @ stub Wow64ValidateUserCallTargetFilter
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for PolyBezierTo implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 82d59861a08cc50a2d886cb48518dc21b445d3e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82d59861a08cc50a2d886cb4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:27:36 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for PolyBezierTo implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +---------- dlls/gdi32/enhmfdrv/graphics.c | 53 ++++++++++++++++++++++++------------------ dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/gdidc.c | 14 +++++++++++ dlls/gdi32/painting.c | 48 ++++++++------------------------------ 5 files changed, 56 insertions(+), 74 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=82d59861a08cc50a2d88…
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for PolylineTo implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: d69a6ab731ebe60db7ba486a5c63a0cbf44e95f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d69a6ab731ebe60db7ba486a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:27:20 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for PolylineTo implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +------------- dlls/gdi32/enhmfdrv/graphics.c | 11 ++++++++++- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/gdidc.c | 14 ++++++++++++++ dlls/gdi32/painting.c | 35 ++++++++++------------------------- 5 files changed, 36 insertions(+), 39 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index d387d4810ab..e1566ab8e69 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -695,18 +695,6 @@ static BOOL CDECL emfpathdrv_PolyDraw( PHYSDEV dev, const POINT *pts, const BYTE next->funcs->pPolyDraw( next, pts, types, count )); } -/*********************************************************************** - * emfpathdrv_PolylineTo - */ -static BOOL CDECL emfpathdrv_PolylineTo( PHYSDEV dev, const POINT *pts, INT count ) -{ - PHYSDEV emfdev = get_emfdev( dev ); - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolylineTo ); - - return (emfdev->funcs->pPolylineTo( emfdev, pts, count ) && - next->funcs->pPolylineTo( next, pts, count )); -} - static const struct gdi_dc_funcs emfpath_driver = { @@ -784,7 +772,7 @@ static const struct gdi_dc_funcs emfpath_driver = emfpathdrv_PolyDraw, /* pPolyDraw */ NULL, /* pPolyPolygon */ NULL, /* pPolyPolyline */ - emfpathdrv_PolylineTo, /* pPolylineTo */ + NULL, /* pPolylineTo */ NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ NULL, /* pRealizePalette */ diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 082432fa079..563698b9920 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -591,12 +591,21 @@ BOOL EMFDC_Polyline( DC_ATTR *dc_attr, const POINT *points, INT count ) return EMFDRV_Polylinegon( dc_attr->emf, points, count, EMR_POLYLINE ); } +/********************************************************************** + * EMFDC_PolylineTo + */ +BOOL EMFDC_PolylineTo( DC_ATTR *dc_attr, const POINT *pt, INT count ) +{ + return EMFDRV_Polylinegon( dc_attr->emf, pt, count, EMR_POLYLINETO ); +} + /********************************************************************** * EMFDRV_PolylineTo */ BOOL CDECL EMFDRV_PolylineTo( PHYSDEV dev, const POINT* pt, INT count ) { - return EMFDRV_Polylinegon( dev, pt, count, EMR_POLYLINETO ); + /* FIXME: update bounding rect */ + return TRUE; } /********************************************************************** diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index fcb7195b302..0fc83e3b6f7 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -76,6 +76,7 @@ extern BOOL EMFDC_PolyPolygon( DC_ATTR *dc_attr, const POINT *points, const INT UINT polys ) DECLSPEC_HIDDEN; extern BOOL EMFDC_Polygon( DC_ATTR *dc_attr, const POINT *points, INT count ) DECLSPEC_HIDDEN; extern BOOL EMFDC_Polyline( DC_ATTR *dc_attr, const POINT *points, INT count) DECLSPEC_HIDDEN; +extern BOOL EMFDC_PolylineTo( DC_ATTR *dc_attr, const POINT *points, INT count ) DECLSPEC_HIDDEN; extern BOOL EMFDC_Rectangle( DC_ATTR *dc_attr, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN; extern BOOL EMFDC_RoundRect( DC_ATTR *dc_attr, INT left, INT top, INT right, INT bottom, diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index d7cd6a45f14..21e74768aec 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -309,3 +309,17 @@ BOOL WINAPI PolyBezier( HDC hdc, const POINT *points, DWORD count ) if (dc_attr->emf && !EMFDC_PolyBezier( dc_attr, points, count )) return FALSE; return NtGdiPolyPolyDraw( hdc, points, &count, 1, NtGdiPolyBezier ); } + +/********************************************************************** + * PolylineTo (GDI32.@) + */ +BOOL WINAPI PolylineTo( HDC hdc, const POINT *points, DWORD count ) +{ + DC_ATTR *dc_attr; + + TRACE( "%p, %p, %u\n", hdc, points, count ); + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + if (dc_attr->emf && !EMFDC_PolylineTo( dc_attr, points, count )) return FALSE; + return NtGdiPolyPolyDraw( hdc, points, &count, 1, NtGdiPolylineTo ); +} diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index ea353aaca9e..4896400b568 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -575,31 +575,6 @@ BOOL WINAPI InvertRgn( HDC hdc, HRGN hrgn ) } -/********************************************************************** - * PolylineTo (GDI32.@) - */ -BOOL WINAPI PolylineTo( HDC hdc, const POINT* pt, DWORD cCount ) -{ - DC * dc = get_dc_ptr( hdc ); - PHYSDEV physdev; - BOOL ret; - - TRACE( "%p, %p, %u\n", hdc, pt, cCount ); - - if(!dc) return FALSE; - - update_dc( dc ); - physdev = GET_DC_PHYSDEV( dc, pPolylineTo ); - ret = physdev->funcs->pPolylineTo( physdev, pt, cCount ); - - if (ret && cCount) - dc->attr->cur_pos = pt[cCount - 1]; - - release_dc_ptr( dc ); - return ret; -} - - /********************************************************************** * NtGdiPolyPolyDraw (win32u.@) */ @@ -636,6 +611,16 @@ ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts else ret = FALSE; break; + case NtGdiPolylineTo: + if (count == 1) + { + physdev = GET_DC_PHYSDEV( dc, pPolylineTo ); + ret = physdev->funcs->pPolylineTo( physdev, points, *counts ); + if (ret && *counts) dc->attr->cur_pos = points[*counts - 1]; + } + else ret = FALSE; + break; + default: WARN( "invalid function %u\n", function ); ret = FALSE;
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for PolyBezier implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 5be1b7c75b298e3378d1627d08ce68853d016256 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5be1b7c75b298e3378d1627d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:27:07 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for PolyBezier implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +------------ dlls/gdi32/enhmfdrv/graphics.c | 11 +++++++++- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/gdidc.c | 14 +++++++++++++ dlls/gdi32/painting.c | 46 ++++++++++-------------------------------- 5 files changed, 37 insertions(+), 49 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index e8b6c8e74ae..d387d4810ab 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -671,18 +671,6 @@ static BOOL CDECL emfpathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, next->funcs->pExtTextOut( next, x, y, flags, rect, str, count, dx )); } -/*********************************************************************** - * emfpathdrv_PolyBezier - */ -static BOOL CDECL emfpathdrv_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count ) -{ - PHYSDEV emfdev = get_emfdev( dev ); - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyBezier ); - - return (emfdev->funcs->pPolyBezier( emfdev, pts, count ) && - next->funcs->pPolyBezier( next, pts, count )); -} - /*********************************************************************** * emfpathdrv_PolyBezierTo */ @@ -791,7 +779,7 @@ static const struct gdi_dc_funcs emfpath_driver = NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ - emfpathdrv_PolyBezier, /* pPolyBezier */ + NULL, /* pPolyBezier */ emfpathdrv_PolyBezierTo, /* pPolyBezierTo */ emfpathdrv_PolyDraw, /* pPolyDraw */ NULL, /* pPolyPolygon */ diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 0c6c581b490..082432fa079 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -608,12 +608,21 @@ BOOL EMFDC_Polygon( DC_ATTR *dc_attr, const POINT *pt, INT count ) return EMFDRV_Polylinegon( dc_attr->emf, pt, count, EMR_POLYGON ); } +/********************************************************************** + * EMFDC_PolyBezier + */ +BOOL EMFDC_PolyBezier( DC_ATTR *dc_attr, const POINT *pts, DWORD count ) +{ + return EMFDRV_Polylinegon( dc_attr->emf, pts, count, EMR_POLYBEZIER ); +} + /********************************************************************** * EMFDRV_PolyBezier */ BOOL CDECL EMFDRV_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count ) { - return EMFDRV_Polylinegon( dev, pts, count, EMR_POLYBEZIER ); + /* FIXME: update bounding rect */ + return TRUE; } /********************************************************************** diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 53df73f1717..fcb7195b302 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -69,6 +69,7 @@ extern BOOL EMFDC_Ellipse( DC_ATTR *dc_attr, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL EMFDC_LineTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN; extern BOOL EMFDC_MoveTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN; +extern BOOL EMFDC_PolyBezier( DC_ATTR *dc_attr, const POINT *points, DWORD count ) DECLSPEC_HIDDEN; extern BOOL EMFDC_PolyPolyline( DC_ATTR *dc_attr, const POINT *points, const DWORD *counts, DWORD polys ) DECLSPEC_HIDDEN; extern BOOL EMFDC_PolyPolygon( DC_ATTR *dc_attr, const POINT *points, const INT *counts, diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index 8486a7c5621..d7cd6a45f14 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -295,3 +295,17 @@ BOOL WINAPI PolyPolyline( HDC hdc, const POINT *points, const DWORD *counts, DWO if (dc_attr->emf && !EMFDC_PolyPolyline( dc_attr, points, counts, polylines )) return FALSE; return NtGdiPolyPolyDraw( hdc, points, counts, polylines, NtGdiPolyPolyline ); } + +/****************************************************************************** + * PolyBezier (GDI32.@) + */ +BOOL WINAPI PolyBezier( HDC hdc, const POINT *points, DWORD count ) +{ + DC_ATTR *dc_attr; + + TRACE( "%p, %p, %u\n", hdc, points, count ); + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + if (dc_attr->emf && !EMFDC_PolyBezier( dc_attr, points, count )) return FALSE; + return NtGdiPolyPolyDraw( hdc, points, &count, 1, NtGdiPolyBezier ); +} diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index e4adb4301e3..ea353aaca9e 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -625,6 +625,17 @@ ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts ret = physdev->funcs->pPolyPolyline( physdev, points, counts, count ); break; + case NtGdiPolyBezier: + /* *counts must be 3 * n + 1 (where n >= 1) */ + if (count == 1 && *counts != 1 && *counts % 3 == 1) + { + physdev = GET_DC_PHYSDEV( dc, pPolyBezier ); + ret = physdev->funcs->pPolyBezier( physdev, points, *counts ); + if (ret) dc->attr->cur_pos = points[*counts - 1]; + } + else ret = FALSE; + break; + default: WARN( "invalid function %u\n", function ); ret = FALSE; @@ -664,41 +675,6 @@ BOOL WINAPI FloodFill( HDC hdc, INT x, INT y, COLORREF color ) return ExtFloodFill( hdc, x, y, color, FLOODFILLBORDER ); } - -/****************************************************************************** - * PolyBezier [GDI32.@] - * Draws one or more Bezier curves - * - * PARAMS - * hDc [I] Handle to device context - * lppt [I] Pointer to endpoints and control points - * cPoints [I] Count of endpoints and control points - * - * RETURNS - * Success: TRUE - * Failure: FALSE - */ -BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints ) -{ - PHYSDEV physdev; - BOOL ret; - DC * dc; - - TRACE( "%p, %p, %u\n", hdc, lppt, cPoints ); - - /* cPoints must be 3 * n + 1 (where n>=1) */ - if (cPoints == 1 || (cPoints % 3) != 1) return FALSE; - - dc = get_dc_ptr( hdc ); - if(!dc) return FALSE; - - update_dc( dc ); - physdev = GET_DC_PHYSDEV( dc, pPolyBezier ); - ret = physdev->funcs->pPolyBezier( physdev, lppt, cPoints ); - release_dc_ptr( dc ); - return ret; -} - /****************************************************************************** * PolyBezierTo [GDI32.@] * Draws one or more Bezier curves
1
0
0
0
Jacek Caban : gdi32: Remove no longer used Polygon and Polyline driver entry points.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 1f5cc0e5ef4518f3cfdebc1a75adf84529350f19 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f5cc0e5ef4518f3cfdebc1a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:26:49 2021 +0200 gdi32: Remove no longer used Polygon and Polyline driver entry points. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/dc.c | 28 ---------------------------- dlls/gdi32/dibdrv/dibdrv.h | 2 -- dlls/gdi32/dibdrv/graphics.c | 24 ++---------------------- dlls/gdi32/driver.c | 17 ----------------- dlls/gdi32/enhmfdrv/dc.c | 2 -- dlls/gdi32/enhmfdrv/init.c | 2 -- dlls/gdi32/font.c | 2 -- dlls/gdi32/mfdrv/init.c | 2 -- dlls/gdi32/path.c | 35 ----------------------------------- dlls/wineandroid.drv/init.c | 2 -- dlls/winemac.drv/gdi.c | 2 -- dlls/wineps.drv/init.c | 2 -- dlls/winex11.drv/init.c | 2 -- dlls/winex11.drv/xrender.c | 2 -- include/wine/gdi_driver.h | 4 +--- 15 files changed, 3 insertions(+), 125 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1f5cc0e5ef4518f3cfde…
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for Polyline implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 77a6beb4f1f784e3cd386d9b234be4be8b9dcf38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77a6beb4f1f784e3cd386d9b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:26:36 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for Polyline implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +------------- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 - dlls/gdi32/enhmfdrv/graphics.c | 6 +++--- dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/gdi_private.h | 2 ++ dlls/gdi32/gdidc.c | 15 +++++++++++++++ dlls/gdi32/mfdrv/graphics.c | 6 +++--- dlls/gdi32/mfdrv/init.c | 2 +- dlls/gdi32/mfdrv/metafiledrv.h | 1 - dlls/gdi32/painting.c | 35 +++++++++++------------------------ 10 files changed, 37 insertions(+), 47 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=77a6beb4f1f784e3cd38…
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for PolyPolyline implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 62fc320c84ec517afa8ee3582243efbf1ab08253 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=62fc320c84ec517afa8ee358…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:26:15 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for PolyPolyline implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +------------- dlls/gdi32/enhmfdrv/graphics.c | 36 +++++++++++++++++++++--------------- dlls/gdi32/gdi_private.h | 2 ++ dlls/gdi32/gdidc.c | 14 ++++++++++++++ dlls/gdi32/painting.c | 26 ++++++-------------------- 5 files changed, 44 insertions(+), 48 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index c4037e5fa99..313535de973 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -707,18 +707,6 @@ static BOOL CDECL emfpathdrv_PolyDraw( PHYSDEV dev, const POINT *pts, const BYTE next->funcs->pPolyDraw( next, pts, types, count )); } -/*********************************************************************** - * emfpathdrv_PolyPolyline - */ -static BOOL CDECL emfpathdrv_PolyPolyline( PHYSDEV dev, const POINT *pts, const DWORD *counts, DWORD polylines ) -{ - PHYSDEV emfdev = get_emfdev( dev ); - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyPolyline ); - - return (emfdev->funcs->pPolyPolyline( emfdev, pts, counts, polylines ) && - next->funcs->pPolyPolyline( next, pts, counts, polylines )); -} - /*********************************************************************** * emfpathdrv_Polyline */ @@ -819,7 +807,7 @@ static const struct gdi_dc_funcs emfpath_driver = emfpathdrv_PolyBezierTo, /* pPolyBezierTo */ emfpathdrv_PolyDraw, /* pPolyDraw */ NULL, /* pPolyPolygon */ - emfpathdrv_PolyPolyline, /* pPolyPolyline */ + NULL, /* pPolyPolyline */ NULL, /* pPolygon */ emfpathdrv_Polyline, /* pPolyline */ emfpathdrv_PolylineTo, /* pPolylineTo */ diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 6d15946d2fb..852dd9de68f 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -626,15 +626,13 @@ BOOL CDECL EMFDRV_PolyBezierTo( PHYSDEV dev, const POINT *pts, DWORD count ) /********************************************************************** - * EMFDRV_PolyPolylinegon + * EMFDC_PolyPolylinegon * * Helper for EMFDRV_PolyPoly{line|gon} */ -static BOOL -EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys, - DWORD iType) +static BOOL EMFDC_PolyPolylinegon( EMFDRV_PDEVICE *emf, const POINT *pt, const INT *counts, + UINT polys, DWORD type) { - EMFDRV_PDEVICE *physDev = get_emf_physdev( dev ); EMRPOLYPOLYLINE *emr; DWORD cptl = 0, poly, size; BOOL ret, use_small_emr, bounds_valid = TRUE; @@ -654,11 +652,11 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po emr = HeapAlloc( GetProcessHeap(), 0, size ); - emr->emr.iType = iType; + emr->emr.iType = type; if(use_small_emr) emr->emr.iType += EMR_POLYPOLYLINE16 - EMR_POLYPOLYLINE; emr->emr.nSize = size; - if(bounds_valid && !physDev->path) + if(bounds_valid && !emf->path) get_points_bounds( &emr->rclBounds, pt, cptl, 0 ); else emr->rclBounds = empty_bounds; @@ -671,25 +669,33 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po store_points( (POINTL *)(emr->aPolyCounts + polys), pt, cptl, use_small_emr ); } - ret = EMFDRV_WriteRecord( dev, &emr->emr ); + ret = EMFDRV_WriteRecord( &emf->dev, &emr->emr ); if(ret && !bounds_valid) { ret = FALSE; SetLastError( ERROR_INVALID_PARAMETER ); } - if(ret && !physDev->path) - EMFDRV_UpdateBBox( dev, &emr->rclBounds ); + if(ret && !emf->path) + EMFDRV_UpdateBBox( &emf->dev, &emr->rclBounds ); HeapFree( GetProcessHeap(), 0, emr ); return ret; } /********************************************************************** - * EMFDRV_PolyPolyline + * EMFDC_PolyPolyline + */ +BOOL EMFDC_PolyPolyline( DC_ATTR *dc_attr, const POINT *pt, const DWORD *counts, DWORD polys) +{ + return EMFDC_PolyPolylinegon( dc_attr->emf, pt, (const INT *)counts, polys, EMR_POLYPOLYLINE ); +} + +/********************************************************************** + * EMFDRV_PolyPoline */ -BOOL CDECL EMFDRV_PolyPolyline(PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polys) +BOOL CDECL EMFDRV_PolyPolyline( PHYSDEV dev, const POINT *pt, const DWORD* counts, UINT polys ) { - return EMFDRV_PolyPolylinegon( dev, pt, (const INT *)counts, polys, - EMR_POLYPOLYLINE ); + /* FIXME: update bounding rect */ + return TRUE; } /********************************************************************** @@ -697,7 +703,7 @@ BOOL CDECL EMFDRV_PolyPolyline(PHYSDEV dev, const POINT* pt, const DWORD* counts */ BOOL EMFDC_PolyPolygon( DC_ATTR *dc_attr, const POINT *pt, const INT *counts, UINT polys ) { - return EMFDRV_PolyPolylinegon( dc_attr->emf, pt, counts, polys, EMR_POLYPOLYGON ); + return EMFDC_PolyPolylinegon( dc_attr->emf, pt, counts, polys, EMR_POLYPOLYGON ); } /********************************************************************** diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 645e78805fd..424d432f0d0 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -68,6 +68,8 @@ extern BOOL EMFDC_Ellipse( DC_ATTR *dc_attr, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL EMFDC_LineTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN; extern BOOL EMFDC_MoveTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN; +extern BOOL EMFDC_PolyPolyline( DC_ATTR *dc_attr, const POINT *points, const DWORD *counts, + DWORD polys ) DECLSPEC_HIDDEN; extern BOOL EMFDC_PolyPolygon( DC_ATTR *dc_attr, const POINT *points, const INT *counts, UINT polys ) DECLSPEC_HIDDEN; extern BOOL EMFDC_Polygon( DC_ATTR *dc_attr, const POINT *points, INT count ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index d224a59941a..89405358194 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -266,3 +266,17 @@ BOOL WINAPI PolyPolygon( HDC hdc, const POINT *points, const INT *counts, UINT p if (dc_attr->emf && !EMFDC_PolyPolygon( dc_attr, points, counts, polygons )) return FALSE; return NtGdiPolyPolyDraw( hdc, points, (const UINT *)counts, polygons, NtGdiPolyPolygon ); } + +/********************************************************************** + * PolyPolyline (GDI32.@) + */ +BOOL WINAPI PolyPolyline( HDC hdc, const POINT *points, const DWORD *counts, DWORD polylines ) +{ + DC_ATTR *dc_attr; + + TRACE( "%p, %p, %p, %u\n", hdc, points, counts, polylines ); + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + if (dc_attr->emf && !EMFDC_PolyPolyline( dc_attr, points, counts, polylines )) return FALSE; + return NtGdiPolyPolyDraw( hdc, points, counts, polylines, NtGdiPolyPolyline ); +} diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index f8544b209d8..5be668cd282 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -632,6 +632,12 @@ ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts physdev = GET_DC_PHYSDEV( dc, pPolyPolygon ); ret = physdev->funcs->pPolyPolygon( physdev, points, (const INT *)counts, count ); break; + + case NtGdiPolyPolyline: + physdev = GET_DC_PHYSDEV( dc, pPolyPolyline ); + ret = physdev->funcs->pPolyPolyline( physdev, points, counts, count ); + break; + default: WARN( "invalid function %u\n", function ); ret = FALSE; @@ -642,26 +648,6 @@ ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts return ret; } -/********************************************************************** - * PolyPolyline (GDI32.@) - */ -BOOL WINAPI PolyPolyline( HDC hdc, const POINT* pt, const DWORD* counts, - DWORD polylines ) -{ - PHYSDEV physdev; - BOOL ret; - DC * dc = get_dc_ptr( hdc ); - - TRACE( "%p, %p, %p, %u\n", hdc, pt, counts, polylines ); - - if (!dc) return FALSE; - update_dc( dc ); - physdev = GET_DC_PHYSDEV( dc, pPolyPolyline ); - ret = physdev->funcs->pPolyPolyline( physdev, pt, counts, polylines ); - release_dc_ptr( dc ); - return ret; -} - /********************************************************************** * ExtFloodFill (GDI32.@) */
1
0
0
0
Jacek Caban : gdi32: Use NtGdiPolyPolyDraw for Polygon implementation.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: c64bfb5433e0405f1dc5a82ea012879c581f3b23 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c64bfb5433e0405f1dc5a82e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:26:00 2021 +0200 gdi32: Use NtGdiPolyPolyDraw for Polygon implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/dc.c | 14 +------------- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 - dlls/gdi32/enhmfdrv/graphics.c | 6 +++--- dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/font.c | 6 ++++-- dlls/gdi32/gdi_private.h | 2 ++ dlls/gdi32/gdidc.c | 15 +++++++++++++++ dlls/gdi32/mfdrv/graphics.c | 14 +++++++------- dlls/gdi32/mfdrv/init.c | 2 +- dlls/gdi32/mfdrv/metafiledrv.h | 1 - dlls/gdi32/painting.c | 20 -------------------- 11 files changed, 34 insertions(+), 49 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c64bfb5433e0405f1dc5…
1
0
0
0
Jacek Caban : winex11: Don't use pPolygon graphics driver entry point.
by Alexandre Julliard
22 Jul '21
22 Jul '21
Module: wine Branch: master Commit: 3a7c1630ea8fedb2ff717762f42b2a4eda39c68a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a7c1630ea8fedb2ff717762…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 22 11:25:30 2021 +0200 winex11: Don't use pPolygon graphics driver entry point. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/graphics.c | 4 +++- dlls/winex11.drv/init.c | 2 +- dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 77ca60ec44d..e2b8b9d3233 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1074,7 +1074,7 @@ BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) /********************************************************************** * X11DRV_Polygon */ -BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) +static BOOL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) { X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); int i; @@ -1123,6 +1123,8 @@ BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, POINT *points; BOOL ret = FALSE; + if (polygons == 1) return X11DRV_Polygon( dev, pt, *counts ); + for (i = 0; i < polygons; i++) { if (counts[i] < 2) return FALSE; diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index ff3d5317697..66603d2a240 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -416,7 +416,7 @@ static const struct gdi_dc_funcs x11drv_funcs = NULL, /* pPolyDraw */ X11DRV_PolyPolygon, /* pPolyPolygon */ X11DRV_PolyPolyline, /* pPolyPolyline */ - X11DRV_Polygon, /* pPolygon */ + NULL, /* pPolygon */ NULL, /* pPolyline */ NULL, /* pPolylineTo */ X11DRV_PutImage, /* pPutImage */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index c23cd512eb9..e14e131d819 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -168,7 +168,6 @@ extern BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN; extern BOOL CDECL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; extern BOOL CDECL X11DRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; -extern BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; extern BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons) DECLSPEC_HIDDEN; extern BOOL CDECL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines) DECLSPEC_HIDDEN; extern DWORD CDECL X11DRV_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200