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
November 2023
----- 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
989 discussions
Start a n
N
ew thread
Alexandre Julliard : include: Remove DECLSPEC_HIDDEN definition.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: c14de4c85e79563f5e859765d0015892ae925cd6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c14de4c85e79563f5e859765d00158…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:53:08 2023 +0100 include: Remove DECLSPEC_HIDDEN definition. --- dlls/dnsapi/dnsapi.h | 2 +- dlls/win32u/ntuser_private.h | 2 +- include/winnt.h | 18 ++++-------------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/dlls/dnsapi/dnsapi.h b/dlls/dnsapi/dnsapi.h index eff5e3582cf..d2b57b96972 100644 --- a/dlls/dnsapi/dnsapi.h +++ b/dlls/dnsapi/dnsapi.h @@ -97,7 +97,7 @@ static inline char *strdup_ua( const char *src ) return dst; } -extern const char *debugstr_type( unsigned short ) DECLSPEC_HIDDEN; +extern const char *debugstr_type( unsigned short ); struct get_searchlist_params { diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index 943384efc30..496d6bab9fe 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -247,7 +247,7 @@ extern void free_dce( struct dce *dce, HWND hwnd ); extern void invalidate_dce( WND *win, const RECT *extra_rect ); /* message.c */ -extern BOOL set_keyboard_auto_repeat( BOOL enable ) DECLSPEC_HIDDEN; +extern BOOL set_keyboard_auto_repeat( BOOL enable ); /* window.c */ HANDLE alloc_user_handle( struct user_object *ptr, unsigned int type ); diff --git a/include/winnt.h b/include/winnt.h index 0af765652b7..67fcc010172 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -51,16 +51,16 @@ extern "C" { #define NTAPI __stdcall #define FASTCALL __fastcall -#ifndef MIDL_PASS +#ifndef DECLSPEC_IMPORT # if defined(_MSC_VER) # define DECLSPEC_IMPORT __declspec(dllimport) # elif defined(__MINGW32__) || defined(__CYGWIN__) # define DECLSPEC_IMPORT __attribute__((dllimport)) +# elif defined(__GNUC__) +# define DECLSPEC_IMPORT __attribute__((visibility ("hidden"))) # else -# define DECLSPEC_IMPORT DECLSPEC_HIDDEN +# define DECLSPEC_IMPORT # endif -#else -# define DECLSPEC_IMPORT #endif #ifndef DECLSPEC_NORETURN @@ -193,16 +193,6 @@ extern "C" { # define DECLSPEC_EXPORT #endif -#ifndef DECLSPEC_HIDDEN -# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) || defined(__sun) -# define DECLSPEC_HIDDEN -# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define DECLSPEC_HIDDEN __attribute__((visibility ("hidden"))) -# else -# define DECLSPEC_HIDDEN -# endif -#endif - #ifndef __has_attribute # define __has_attribute(x) 0 #endif
1
0
0
0
Alexandre Julliard : winex11.drv: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: bfeba8d2d175a02b4f447d134732ddf76e61c0da URL:
https://gitlab.winehq.org/wine/wine/-/commit/bfeba8d2d175a02b4f447d134732dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:52:04 2023 +0100 winex11.drv: Remove DECLSPEC_HIDDEN usage. --- dlls/winex11.drv/x11drv.h | 492 +++++++++++++++++++++--------------------- dlls/winex11.drv/x11drv_dll.h | 18 +- dlls/winex11.drv/xcomposite.h | 2 +- 3 files changed, 256 insertions(+), 256 deletions(-)
1
0
0
0
Alexandre Julliard : winewayland.drv: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: d18e32c8697f004d11f3c0b3d83d34ce26f9aec1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d18e32c8697f004d11f3c0b3d83d34…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:51:50 2023 +0100 winewayland.drv: Remove DECLSPEC_HIDDEN usage. --- dlls/winewayland.drv/waylanddrv.h | 78 +++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 383c79a23fe..2ab2c3e8e28 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -48,7 +48,7 @@ * Globals */ -extern struct wayland process_wayland DECLSPEC_HIDDEN; +extern struct wayland process_wayland; /********************************************************************** * Definitions for wayland types @@ -207,74 +207,74 @@ struct wayland_shm_buffer * Wayland initialization */ -BOOL wayland_process_init(void) DECLSPEC_HIDDEN; -void wayland_init_display_devices(BOOL force) DECLSPEC_HIDDEN; +BOOL wayland_process_init(void); +void wayland_init_display_devices(BOOL force); /********************************************************************** * Wayland output */ -BOOL wayland_output_create(uint32_t id, uint32_t version) DECLSPEC_HIDDEN; -void wayland_output_destroy(struct wayland_output *output) DECLSPEC_HIDDEN; -void wayland_output_use_xdg_extension(struct wayland_output *output) DECLSPEC_HIDDEN; +BOOL wayland_output_create(uint32_t id, uint32_t version); +void wayland_output_destroy(struct wayland_output *output); +void wayland_output_use_xdg_extension(struct wayland_output *output); /********************************************************************** * Wayland surface */ -struct wayland_surface *wayland_surface_create(HWND hwnd) DECLSPEC_HIDDEN; -void wayland_surface_destroy(struct wayland_surface *surface) DECLSPEC_HIDDEN; -void wayland_surface_make_toplevel(struct wayland_surface *surface) DECLSPEC_HIDDEN; -void wayland_surface_clear_role(struct wayland_surface *surface) DECLSPEC_HIDDEN; +struct wayland_surface *wayland_surface_create(HWND hwnd); +void wayland_surface_destroy(struct wayland_surface *surface); +void wayland_surface_make_toplevel(struct wayland_surface *surface); +void wayland_surface_clear_role(struct wayland_surface *surface); void wayland_surface_attach_shm(struct wayland_surface *surface, struct wayland_shm_buffer *shm_buffer, - HRGN surface_damage_region) DECLSPEC_HIDDEN; -struct wayland_surface *wayland_surface_lock_hwnd(HWND hwnd) DECLSPEC_HIDDEN; -BOOL wayland_surface_reconfigure(struct wayland_surface *surface) DECLSPEC_HIDDEN; + HRGN surface_damage_region); +struct wayland_surface *wayland_surface_lock_hwnd(HWND hwnd); +BOOL wayland_surface_reconfigure(struct wayland_surface *surface); BOOL wayland_surface_config_is_compatible(struct wayland_surface_config *conf, int width, int height, - enum wayland_surface_config_state state) DECLSPEC_HIDDEN; + enum wayland_surface_config_state state); void wayland_surface_coords_from_window(struct wayland_surface *surface, int window_x, int window_y, - int *surface_x, int *surface_y) DECLSPEC_HIDDEN; + int *surface_x, int *surface_y); void wayland_surface_coords_to_window(struct wayland_surface *surface, double surface_x, double surface_y, - int *window_x, int *window_y) DECLSPEC_HIDDEN; -struct wayland_client_surface *wayland_surface_get_client(struct wayland_surface *surface) DECLSPEC_HIDDEN; -BOOL wayland_client_surface_release(struct wayland_client_surface *client) DECLSPEC_HIDDEN; -void wayland_surface_ensure_contents(struct wayland_surface *surface) DECLSPEC_HIDDEN; + int *window_x, int *window_y); +struct wayland_client_surface *wayland_surface_get_client(struct wayland_surface *surface); +BOOL wayland_client_surface_release(struct wayland_client_surface *client); +void wayland_surface_ensure_contents(struct wayland_surface *surface); /********************************************************************** * Wayland SHM buffer */ struct wayland_shm_buffer *wayland_shm_buffer_create(int width, int height, - enum wl_shm_format format) DECLSPEC_HIDDEN; -void wayland_shm_buffer_ref(struct wayland_shm_buffer *shm_buffer) DECLSPEC_HIDDEN; -void wayland_shm_buffer_unref(struct wayland_shm_buffer *shm_buffer) DECLSPEC_HIDDEN; + enum wl_shm_format format); +void wayland_shm_buffer_ref(struct wayland_shm_buffer *shm_buffer); +void wayland_shm_buffer_unref(struct wayland_shm_buffer *shm_buffer); /********************************************************************** * Wayland window surface */ -struct window_surface *wayland_window_surface_create(HWND hwnd, const RECT *rect) DECLSPEC_HIDDEN; +struct window_surface *wayland_window_surface_create(HWND hwnd, const RECT *rect); void wayland_window_surface_update_wayland_surface(struct window_surface *surface, - struct wayland_surface *wayland_surface) DECLSPEC_HIDDEN; -void wayland_window_flush(HWND hwnd) DECLSPEC_HIDDEN; + struct wayland_surface *wayland_surface); +void wayland_window_flush(HWND hwnd); /********************************************************************** * Wayland Keyboard */ -void wayland_keyboard_init(struct wl_keyboard *wl_keyboard) DECLSPEC_HIDDEN; -void wayland_keyboard_deinit(void) DECLSPEC_HIDDEN; +void wayland_keyboard_init(struct wl_keyboard *wl_keyboard); +void wayland_keyboard_deinit(void); /********************************************************************** * Wayland pointer */ -void wayland_pointer_init(struct wl_pointer *wl_pointer) DECLSPEC_HIDDEN; -void wayland_pointer_deinit(void) DECLSPEC_HIDDEN; +void wayland_pointer_init(struct wl_pointer *wl_pointer); +void wayland_pointer_deinit(void); /********************************************************************** * Helpers @@ -294,26 +294,26 @@ static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp return NtUserMessageCall(hwnd, msg, wparam, lparam, NULL, NtUserSendMessage, FALSE); } -RGNDATA *get_region_data(HRGN region) DECLSPEC_HIDDEN; +RGNDATA *get_region_data(HRGN region); /********************************************************************** * USER driver functions */ -LRESULT WAYLAND_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN; -void WAYLAND_DestroyWindow(HWND hwnd) DECLSPEC_HIDDEN; -void WAYLAND_SetCursor(HWND hwnd, HCURSOR hcursor) DECLSPEC_HIDDEN; -LRESULT WAYLAND_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam) DECLSPEC_HIDDEN; +LRESULT WAYLAND_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); +void WAYLAND_DestroyWindow(HWND hwnd); +void WAYLAND_SetCursor(HWND hwnd, HCURSOR hcursor); +LRESULT WAYLAND_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam); BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, - BOOL force, void *param) DECLSPEC_HIDDEN; -LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN; + BOOL force, void *param); +LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, - struct window_surface *surface) DECLSPEC_HIDDEN; + struct window_surface *surface); BOOL WAYLAND_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface) DECLSPEC_HIDDEN; -const struct vulkan_funcs *WAYLAND_wine_get_vulkan_driver(UINT version) DECLSPEC_HIDDEN; + RECT *visible_rect, struct window_surface **surface); +const struct vulkan_funcs *WAYLAND_wine_get_vulkan_driver(UINT version); #endif /* __WINE_WAYLANDDRV_H */
1
0
0
0
Alexandre Julliard : winemac.drv: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: fcd587a80e4d312247af614f3f2d915a31682efd URL:
https://gitlab.winehq.org/wine/wine/-/commit/fcd587a80e4d312247af614f3f2d91…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:51:19 2023 +0100 winemac.drv: Remove DECLSPEC_HIDDEN usage. --- dlls/winemac.drv/cocoa_event.h | 4 +- dlls/winemac.drv/macdrv.h | 264 ++++++++++++++++++++-------------------- dlls/winemac.drv/macdrv_cocoa.h | 230 +++++++++++++++++----------------- dlls/winemac.drv/macdrv_dll.h | 8 +- 4 files changed, 247 insertions(+), 259 deletions(-)
1
0
0
0
Alexandre Julliard : wineandroid.drv: Remove DECLSPEC_HIDDEN usage.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: 35b3ff8ad6b3d37fca1b5e2becedb7d079ebd4c6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/35b3ff8ad6b3d37fca1b5e2becedb7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:51:07 2023 +0100 wineandroid.drv: Remove DECLSPEC_HIDDEN usage. --- dlls/wineandroid.drv/android.h | 108 ++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index 2eb6a288a72..184fec8372b 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -42,7 +42,7 @@ * Android interface */ -#define DECL_FUNCPTR(f) extern typeof(f) * p##f DECLSPEC_HIDDEN +#define DECL_FUNCPTR(f) extern typeof(f) * p##f DECL_FUNCPTR( __android_log_print ); DECL_FUNCPTR( ANativeWindow_fromSurface ); DECL_FUNCPTR( ANativeWindow_release ); @@ -53,96 +53,96 @@ DECL_FUNCPTR( ANativeWindow_release ); * OpenGL driver */ -extern pthread_mutex_t drawable_mutex DECLSPEC_HIDDEN; -extern void update_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN; -extern void destroy_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN; -extern struct opengl_funcs *get_wgl_driver( UINT version ) DECLSPEC_HIDDEN; +extern pthread_mutex_t drawable_mutex; +extern void update_gl_drawable( HWND hwnd ); +extern void destroy_gl_drawable( HWND hwnd ); +extern struct opengl_funcs *get_wgl_driver( UINT version ); /************************************************************************** * Android pseudo-device */ -extern void start_android_device(void) DECLSPEC_HIDDEN; -extern void register_native_window( HWND hwnd, struct ANativeWindow *win, BOOL client ) DECLSPEC_HIDDEN; -extern struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl, float scale ) DECLSPEC_HIDDEN; -extern struct ANativeWindow *grab_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN; -extern void release_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN; -extern void destroy_ioctl_window( HWND hwnd, BOOL opengl ) DECLSPEC_HIDDEN; +extern void start_android_device(void); +extern void register_native_window( HWND hwnd, struct ANativeWindow *win, BOOL client ); +extern struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl, float scale ); +extern struct ANativeWindow *grab_ioctl_window( struct ANativeWindow *window ); +extern void release_ioctl_window( struct ANativeWindow *window ); +extern void destroy_ioctl_window( HWND hwnd, BOOL opengl ); extern int ioctl_window_pos_changed( HWND hwnd, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, UINT style, UINT flags, - HWND after, HWND owner ) DECLSPEC_HIDDEN; -extern int ioctl_set_window_parent( HWND hwnd, HWND parent, float scale ) DECLSPEC_HIDDEN; -extern int ioctl_set_capture( HWND hwnd ) DECLSPEC_HIDDEN; + HWND after, HWND owner ); +extern int ioctl_set_window_parent( HWND hwnd, HWND parent, float scale ); +extern int ioctl_set_capture( HWND hwnd ); extern int ioctl_set_cursor( int id, int width, int height, - int hotspotx, int hotspoty, const unsigned int *bits ) DECLSPEC_HIDDEN; + int hotspotx, int hotspoty, const unsigned int *bits ); /************************************************************************** * USER driver */ -extern pthread_mutex_t win_data_mutex DECLSPEC_HIDDEN; -extern INT ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size ) DECLSPEC_HIDDEN; -extern UINT ANDROID_MapVirtualKeyEx( UINT code, UINT maptype, HKL hkl ) DECLSPEC_HIDDEN; -extern SHORT ANDROID_VkKeyScanEx( WCHAR ch, HKL hkl ) DECLSPEC_HIDDEN; -extern void ANDROID_SetCursor( HWND hwnd, HCURSOR handle ) DECLSPEC_HIDDEN; -extern BOOL ANDROID_CreateDesktop( const WCHAR *name, UINT width, UINT height ) DECLSPEC_HIDDEN; -extern BOOL ANDROID_CreateWindow( HWND hwnd ) DECLSPEC_HIDDEN; -extern void ANDROID_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN; -extern BOOL ANDROID_ProcessEvents( DWORD mask ) DECLSPEC_HIDDEN; -extern LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN; +extern pthread_mutex_t win_data_mutex; +extern INT ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size ); +extern UINT ANDROID_MapVirtualKeyEx( UINT code, UINT maptype, HKL hkl ); +extern SHORT ANDROID_VkKeyScanEx( WCHAR ch, HKL hkl ); +extern void ANDROID_SetCursor( HWND hwnd, HCURSOR handle ); +extern BOOL ANDROID_CreateDesktop( const WCHAR *name, UINT width, UINT height ); +extern BOOL ANDROID_CreateWindow( HWND hwnd ); +extern void ANDROID_DestroyWindow( HWND hwnd ); +extern BOOL ANDROID_ProcessEvents( DWORD mask ); +extern LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); extern void ANDROID_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, - DWORD flags ) DECLSPEC_HIDDEN; -extern void ANDROID_SetParent( HWND hwnd, HWND parent, HWND old_parent ) DECLSPEC_HIDDEN; -extern void ANDROID_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw ) DECLSPEC_HIDDEN; -extern void ANDROID_SetCapture( HWND hwnd, UINT flags ) DECLSPEC_HIDDEN; -extern void ANDROID_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) DECLSPEC_HIDDEN; -extern UINT ANDROID_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ) DECLSPEC_HIDDEN; + DWORD flags ); +extern void ANDROID_SetParent( HWND hwnd, HWND parent, HWND old_parent ); +extern void ANDROID_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw ); +extern void ANDROID_SetCapture( HWND hwnd, UINT flags ); +extern void ANDROID_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ); +extern UINT ANDROID_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ); extern BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, - const RECT *window_rect ) DECLSPEC_HIDDEN; -extern LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN; + const RECT *window_rect ); +extern LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); extern BOOL ANDROID_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ) DECLSPEC_HIDDEN; + RECT *visible_rect, struct window_surface **surface ); extern void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, - struct window_surface *surface ) DECLSPEC_HIDDEN; + struct window_surface *surface ); /* unixlib interface */ -extern NTSTATUS android_dispatch_ioctl( void *arg ) DECLSPEC_HIDDEN; -extern NTSTATUS android_java_init( void *arg ) DECLSPEC_HIDDEN; -extern NTSTATUS android_java_uninit( void *arg ) DECLSPEC_HIDDEN; -extern NTSTATUS android_register_window( void *arg ) DECLSPEC_HIDDEN; +extern NTSTATUS android_dispatch_ioctl( void *arg ); +extern NTSTATUS android_java_init( void *arg ); +extern NTSTATUS android_java_uninit( void *arg ); +extern NTSTATUS android_register_window( void *arg ); extern PNTAPCFUNC register_window_callback; -extern unsigned int screen_width DECLSPEC_HIDDEN; -extern unsigned int screen_height DECLSPEC_HIDDEN; -extern RECT virtual_screen_rect DECLSPEC_HIDDEN; -extern MONITORINFOEXW default_monitor DECLSPEC_HIDDEN; +extern unsigned int screen_width; +extern unsigned int screen_height; +extern RECT virtual_screen_rect; +extern MONITORINFOEXW default_monitor; enum android_window_messages { WM_ANDROID_REFRESH = 0x80001000, }; -extern void init_gralloc( const struct hw_module_t *module ) DECLSPEC_HIDDEN; -extern HWND get_capture_window(void) DECLSPEC_HIDDEN; -extern void init_monitors( int width, int height ) DECLSPEC_HIDDEN; -extern void set_screen_dpi( DWORD dpi ) DECLSPEC_HIDDEN; -extern void update_keyboard_lock_state( WORD vkey, UINT state ) DECLSPEC_HIDDEN; +extern void init_gralloc( const struct hw_module_t *module ); +extern HWND get_capture_window(void); +extern void init_monitors( int width, int height ); +extern void set_screen_dpi( DWORD dpi ); +extern void update_keyboard_lock_state( WORD vkey, UINT state ); /* JNI entry points */ -extern void desktop_changed( JNIEnv *env, jobject obj, jint width, jint height ) DECLSPEC_HIDDEN; -extern void config_changed( JNIEnv *env, jobject obj, jint dpi ) DECLSPEC_HIDDEN; +extern void desktop_changed( JNIEnv *env, jobject obj, jint width, jint height ); +extern void config_changed( JNIEnv *env, jobject obj, jint dpi ); extern void surface_changed( JNIEnv *env, jobject obj, jint win, jobject surface, - jboolean client ) DECLSPEC_HIDDEN; + jboolean client ); extern jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action, - jint x, jint y, jint state, jint vscroll ) DECLSPEC_HIDDEN; + jint x, jint y, jint state, jint vscroll ); extern jboolean keyboard_event( JNIEnv *env, jobject obj, jint win, jint action, - jint keycode, jint state ) DECLSPEC_HIDDEN; + jint keycode, jint state ); enum event_type { @@ -191,7 +191,7 @@ union event_data } kbd; }; -int send_event( const union event_data *data ) DECLSPEC_HIDDEN; +int send_event( const union event_data *data ); extern JavaVM **p_java_vm; extern jobject *p_java_object;
1
0
0
0
Alexandre Julliard : wineboot: Remove a noisy FIXME.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: ef9debff6052cf502e290fe128c0c10f98551c6a URL:
https://gitlab.winehq.org/wine/wine/-/commit/ef9debff6052cf502e290fe128c0c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 29 20:36:15 2023 +0100 wineboot: Remove a noisy FIXME. --- programs/wineboot/wineboot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 58fa6939a9a..d996aa83f95 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -350,7 +350,6 @@ static void initialize_xstate_features(struct _KUSER_SHARED_DATA *data) static UINT64 read_tsc_frequency(void) { - FIXME( "TSC frequency calibration not implemented\n" ); return 0; }
1
0
0
0
Paul Gofman : ntdll: Implement NtQueryInformationThread(ThreadIsTerminated).
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: 4c9b39964cbc8d034265249d3af2212fea657304 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4c9b39964cbc8d034265249d3af221…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Nov 28 17:21:17 2023 -0600 ntdll: Implement NtQueryInformationThread(ThreadIsTerminated). --- dlls/ntdll/tests/info.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/thread.c | 21 ++++++++++++++++++++- dlls/wow64/process.c | 1 + include/wine/server_protocol.h | 6 ++++-- server/protocol.def | 4 +++- server/request.h | 2 +- server/thread.c | 6 +++++- server/trace.c | 2 +- 8 files changed, 74 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 3cedca0d6ef..68a9f165bfd 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -3697,6 +3697,44 @@ static void test_debuggee_dbgport(int argc, char **argv) winetest_pop_context(); } +static DWORD WINAPI test_ThreadIsTerminated_thread( void *stop_event ) +{ + WaitForSingleObject( stop_event, INFINITE ); + return STATUS_PENDING; +} + +static void test_ThreadIsTerminated(void) +{ + HANDLE thread, stop_event; + ULONG terminated; + NTSTATUS status; + + stop_event = CreateEventW( NULL, FALSE, FALSE, NULL ); + thread = CreateThread( NULL, 0, test_ThreadIsTerminated_thread, stop_event, 0, NULL ); + ok( thread != INVALID_HANDLE_VALUE, "failed, error %ld\n", GetLastError() ); + + status = pNtQueryInformationThread( thread, ThreadIsTerminated, &terminated, sizeof(terminated) * 2, NULL ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "got %#lx.\n", status ); + + terminated = 0xdeadbeef; + status = pNtQueryInformationThread( thread, ThreadIsTerminated, &terminated, sizeof(terminated), NULL ); + ok( !status, "got %#lx.\n", status ); + ok( !terminated, "got %lu.\n", terminated ); + + SetEvent( stop_event ); + WaitForSingleObject( thread, INFINITE ); + + status = pNtQueryInformationThread( thread, ThreadIsTerminated, &terminated, sizeof(terminated), NULL ); + ok( !status, "got %#lx.\n", status ); + ok( terminated == 1, "got %lu.\n", terminated ); + + CloseHandle(stop_event); + CloseHandle(thread); + + status = pNtQueryInformationThread( thread, ThreadIsTerminated, &terminated, sizeof(terminated), NULL ); + ok( status == STATUS_INVALID_HANDLE, "got %#lx.\n", status ); +} + START_TEST(info) { char **argv; @@ -3760,6 +3798,7 @@ START_TEST(info) test_thread_start_address(); test_thread_lookup(); test_thread_ideal_processor(); + test_ThreadIsTerminated(); test_affinity(); test_debug_object(); diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index c4653c6a769..9e84ec3cc96 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2143,6 +2143,25 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, if (ret_len) *ret_len = sizeof(BOOL); return STATUS_SUCCESS; + case ThreadIsTerminated: + { + ULONG terminated; + + if (length != sizeof(ULONG)) return STATUS_INFO_LENGTH_MISMATCH; + SERVER_START_REQ( get_thread_info ) + { + req->handle = wine_server_obj_handle( handle ); + if (!(status = wine_server_call( req ))) terminated = !!(reply->flags & GET_THREAD_INFO_FLAG_TERMINATED); + } + SERVER_END_REQ; + if (!status) + { + *(ULONG *)data = terminated; + if (ret_len) *ret_len = sizeof(ULONG); + } + return status; + } + case ThreadSuspendCount: if (length != sizeof(ULONG)) return STATUS_INFO_LENGTH_MISMATCH; if (!data) return STATUS_ACCESS_VIOLATION; @@ -2196,7 +2215,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, req->handle = wine_server_obj_handle( handle ); req->access = THREAD_QUERY_INFORMATION; if ((status = wine_server_call( req ))) return status; - *(BOOLEAN*)data = reply->dbg_hidden; + *(BOOLEAN*)data = !!(reply->flags & GET_THREAD_INFO_FLAG_DBG_HIDDEN); } SERVER_END_REQ; if (ret_len) *ret_len = sizeof(BOOLEAN); diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c index c144af7743c..817926d0f13 100644 --- a/dlls/wow64/process.c +++ b/dlls/wow64/process.c @@ -688,6 +688,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args ) case ThreadEnableAlignmentFaultFixup: /* set only */ case ThreadAmILastThread: /* ULONG */ case ThreadIsIoPending: /* ULONG */ + case ThreadIsTerminated: /* ULONG */ case ThreadHideFromDebugger: /* BOOLEAN */ case ThreadSuspendCount: /* ULONG */ case ThreadPriorityBoost: /* ULONG */ diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index a392b532f4e..15156a12353 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1162,10 +1162,12 @@ struct get_thread_info_reply int priority; int last; int suspend_count; - int dbg_hidden; + unsigned int flags; data_size_t desc_len; /* VARARG(desc,unicode_str); */ }; +#define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01 +#define GET_THREAD_INFO_FLAG_TERMINATED 0x02 @@ -6504,7 +6506,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 784 +#define SERVER_PROTOCOL_VERSION 785 /* ### protocol_version end ### */ diff --git a/server/protocol.def b/server/protocol.def index e9195df6b65..b4d6d74d6fc 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1085,10 +1085,12 @@ typedef struct int priority; /* thread priority level */ int last; /* last thread in process */ int suspend_count; /* thread suspend count */ - int dbg_hidden; /* thread hidden from debugger */ + unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */ data_size_t desc_len; /* description length in bytes */ VARARG(desc,unicode_str); /* description string */ @END +#define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01 +#define GET_THREAD_INFO_FLAG_TERMINATED 0x02 /* Retrieve information about thread times */ diff --git a/server/request.h b/server/request.h index d6043c5fdc3..89d5a621b16 100644 --- a/server/request.h +++ b/server/request.h @@ -860,7 +860,7 @@ C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, exit_code) == 40 ); C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, priority) == 44 ); C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, last) == 48 ); C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, suspend_count) == 52 ); -C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, dbg_hidden) == 56 ); +C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, flags) == 56 ); C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, desc_len) == 60 ); C_ASSERT( sizeof(struct get_thread_info_reply) == 64 ); C_ASSERT( FIELD_OFFSET(struct get_thread_times_request, handle) == 12 ); diff --git a/server/thread.c b/server/thread.c index 83ae381d5c5..50eddabe8eb 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1496,8 +1496,12 @@ DECL_HANDLER(get_thread_info) reply->affinity = thread->affinity; reply->last = thread->process->running_threads == 1; reply->suspend_count = thread->suspend; - reply->dbg_hidden = thread->dbg_hidden; reply->desc_len = thread->desc_len; + reply->flags = 0; + if (thread->dbg_hidden) + reply->flags |= GET_THREAD_INFO_FLAG_DBG_HIDDEN; + if (thread->state == TERMINATED) + reply->flags |= GET_THREAD_INFO_FLAG_TERMINATED; if (thread->desc && get_reply_max_size()) { diff --git a/server/trace.c b/server/trace.c index 55ccefa1746..1b65d2b977e 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1604,7 +1604,7 @@ static void dump_get_thread_info_reply( const struct get_thread_info_reply *req fprintf( stderr, ", priority=%d", req->priority ); fprintf( stderr, ", last=%d", req->last ); fprintf( stderr, ", suspend_count=%d", req->suspend_count ); - fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden ); + fprintf( stderr, ", flags=%08x", req->flags ); fprintf( stderr, ", desc_len=%u", req->desc_len ); dump_varargs_unicode_str( ", desc=", cur_size ); }
1
0
0
0
Brendan McGrath : d2d1: Acquire lock before attempt to draw to device context.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: 72590048b26720b0bc1f2cd3e82578bce885de5c URL:
https://gitlab.winehq.org/wine/wine/-/commit/72590048b26720b0bc1f2cd3e82578…
Author: Brendan McGrath <bmcgrath(a)codeweavers.com> Date: Tue Nov 21 16:09:08 2023 +1100 d2d1: Acquire lock before attempt to draw to device context. Ensures the Direct 2D lock is held before attempting to access Direct 2D exclusive resources. This fixes periodic crashes in PowerPoint 365 --- dlls/d2d1/d2d1_private.h | 25 ++++++++++++++++++++++++- dlls/d2d1/device.c | 11 +++++++++++ dlls/d2d1/factory.c | 23 +---------------------- dlls/d2d1/tests/d2d1.c | 5 +++-- 4 files changed, 39 insertions(+), 25 deletions(-) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 1dd5cdb0a39..36bedf8331c 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -171,6 +171,7 @@ struct d2d_device_context const struct d2d_device_context_ops *ops; ID2D1Factory *factory; + CRITICAL_SECTION *cs; struct d2d_device *device; ID3D11Device1 *d3d_device; ID3DDeviceContextState *d3d_state; @@ -678,7 +679,29 @@ struct d2d_effect_registration struct d2d_effect_properties properties; }; -struct d2d_factory; +struct d2d_factory +{ + ID2D1Factory3 ID2D1Factory3_iface; + ID2D1Multithread ID2D1Multithread_iface; + LONG refcount; + + ID3D10Device1 *device; + + float dpi_x; + float dpi_y; + + struct list effects; + INIT_ONCE init_builtins; + + CRITICAL_SECTION cs; + D2D1_FACTORY_TYPE factory_type; +}; + +static inline struct d2d_factory *unsafe_impl_from_ID2D1Factory(ID2D1Factory *iface) +{ + return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory3_iface); +} + void d2d_effects_init_builtins(struct d2d_factory *factory); struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *factory, const GUID *effect_id); diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index e5548878ee9..505bdc8c00e 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -135,6 +135,9 @@ static void d2d_device_context_draw(struct d2d_device_context *render_target, en vp.MinDepth = 0.0f; vp.MaxDepth = 1.0f; + if (render_target->cs) + EnterCriticalSection(render_target->cs); + ID3D11Device1_GetImmediateContext1(device, &context); ID3D11DeviceContext1_SwapDeviceContextState(context, render_target->d3d_state, &prev_state); @@ -188,6 +191,9 @@ static void d2d_device_context_draw(struct d2d_device_context *render_target, en ID3D11DeviceContext1_SwapDeviceContextState(context, prev_state, NULL); ID3D11DeviceContext1_Release(context); ID3DDeviceContextState_Release(prev_state); + + if (render_target->cs) + LeaveCriticalSection(render_target->cs); } static void d2d_device_context_set_error(struct d2d_device_context *context, HRESULT code) @@ -3196,6 +3202,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, IDWriteFactory *dwrite_factory; D3D11_RASTERIZER_DESC rs_desc; D3D11_BUFFER_DESC buffer_desc; + struct d2d_factory *factory; unsigned int i; HRESULT hr; @@ -4256,6 +4263,10 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, render_target->device = device; ID2D1Device1_AddRef(&render_target->device->ID2D1Device1_iface); + factory = unsafe_impl_from_ID2D1Factory(render_target->factory); + if (factory->factory_type == D2D1_FACTORY_TYPE_MULTI_THREADED) + render_target->cs = &factory->cs; + render_target->outer_unknown = outer_unknown ? outer_unknown : &render_target->IUnknown_iface; render_target->ops = ops; diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index 3b2b1f5e4ec..d349da376fc 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -36,33 +36,11 @@ static void d2d_effect_registration_cleanup(struct d2d_effect_registration *reg) free(reg); } -struct d2d_factory -{ - ID2D1Factory3 ID2D1Factory3_iface; - ID2D1Multithread ID2D1Multithread_iface; - LONG refcount; - - ID3D10Device1 *device; - - float dpi_x; - float dpi_y; - - struct list effects; - INIT_ONCE init_builtins; - - CRITICAL_SECTION cs; -}; - static inline struct d2d_factory *impl_from_ID2D1Factory3(ID2D1Factory3 *iface) { return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory3_iface); } -static inline struct d2d_factory *unsafe_impl_from_ID2D1Factory(ID2D1Factory *iface) -{ - return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory3_iface); -} - static inline struct d2d_factory *impl_from_ID2D1Multithread(ID2D1Multithread *iface) { return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Multithread_iface); @@ -1215,6 +1193,7 @@ static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE fact factory->ID2D1Factory3_iface.lpVtbl = &d2d_factory_vtbl; factory->ID2D1Multithread_iface.lpVtbl = factory_type == D2D1_FACTORY_TYPE_SINGLE_THREADED ? &d2d_factory_multithread_noop_vtbl : &d2d_factory_multithread_vtbl; + factory->factory_type = factory_type; factory->refcount = 1; d2d_factory_reload_sysmetrics(factory); list_init(&factory->effects); diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 3a8d97162fa..61177aba9de 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10695,7 +10695,8 @@ static DWORD WINAPI mt_factory_test_thread_func(void *param) return 0; } -static DWORD WINAPI mt_factory_test_thread_draw_func(void *param) { +static DWORD WINAPI mt_factory_test_thread_draw_func(void *param) +{ ID2D1RenderTarget *rt = param; D2D1_COLOR_F color; HRESULT hr; @@ -10777,7 +10778,7 @@ static void test_mt_factory(BOOL d3d11) thread = CreateThread(NULL, 0, mt_factory_test_thread_draw_func, ctx.rt, 0, NULL); ok(!!thread, "Failed to create a thread.\n"); ret = WaitForSingleObject(thread, 1000); - todo_wine ok(ret == WAIT_TIMEOUT, "Expected timeout.\n"); + ok(ret == WAIT_TIMEOUT, "Expected timeout.\n"); ID2D1Multithread_Leave(multithread); WaitForSingleObject(thread, INFINITE); CloseHandle(thread);
1
0
0
0
Brendan McGrath : d2d1: Add test for singlethreaded draw.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: e6954d793bc5ad50c882dadf6e3c32922002e44c URL:
https://gitlab.winehq.org/wine/wine/-/commit/e6954d793bc5ad50c882dadf6e3c32…
Author: Brendan McGrath <bmcgrath(a)codeweavers.com> Date: Wed Nov 22 09:52:28 2023 +1100 d2d1: Add test for singlethreaded draw. Tests that Direct2D can access D2D exclusive resources whilst the Direct 2D lock is held if the factory type is single threaded --- dlls/d2d1/tests/d2d1.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 1e4d77e1c84..3a8d97162fa 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10784,6 +10784,24 @@ static void test_mt_factory(BOOL d3d11) ID2D1Multithread_Release(multithread); release_test_context(&ctx); + + if (!init_test_context(&ctx, d3d11)) + return; + + hr = ID2D1Factory_QueryInterface(ctx.factory, &IID_ID2D1Multithread, (void **)&multithread); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + ID2D1Multithread_Enter(multithread); + thread = CreateThread(NULL, 0, mt_factory_test_thread_draw_func, ctx.rt, 0, NULL); + ok(!!thread, "Failed to create a thread.\n"); + ret = WaitForSingleObject(thread, 1000); + ok(ret == WAIT_OBJECT_0, "Didn't expect timeout.\n"); + ID2D1Multithread_Leave(multithread); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + ID2D1Multithread_Release(multithread); + release_test_context(&ctx); } #define check_system_properties(effect, is_builtin) check_system_properties_(__LINE__, effect, is_builtin)
1
0
0
0
Brendan McGrath : d2d1: Add test for multithreaded draw.
by Alexandre Julliard
29 Nov '23
29 Nov '23
Module: wine Branch: master Commit: de9eeba7bd98993453ee36aeea9da451932a759d URL:
https://gitlab.winehq.org/wine/wine/-/commit/de9eeba7bd98993453ee36aeea9da4…
Author: Brendan McGrath <bmcgrath(a)codeweavers.com> Date: Tue Nov 21 16:04:55 2023 +1100 d2d1: Add test for multithreaded draw. Tests that Direct2D can not access D2D exclusive resources whilst the Direct 2D lock is held --- dlls/d2d1/tests/d2d1.c | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 58f905ca1dc..1e4d77e1c84 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -1163,13 +1163,13 @@ static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window } static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface, - const D2D1_RENDER_TARGET_PROPERTIES *desc, BOOL d3d11) + const D2D1_RENDER_TARGET_PROPERTIES *desc, BOOL d3d11, D2D1_FACTORY_TYPE factory_type) { ID2D1RenderTarget *render_target; ID2D1Factory *factory; HRESULT hr; - hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory); + hr = D2D1CreateFactory(factory_type, &IID_ID2D1Factory, NULL, (void **)&factory); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, desc, &render_target); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); @@ -1178,7 +1178,7 @@ static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface, return render_target; } -static ID2D1RenderTarget *create_render_target(IDXGISurface *surface, BOOL d3d11) +static ID2D1RenderTarget *create_render_target(IDXGISurface *surface, BOOL d3d11, D2D1_FACTORY_TYPE factory_type) { D2D1_RENDER_TARGET_PROPERTIES desc; @@ -1190,7 +1190,7 @@ static ID2D1RenderTarget *create_render_target(IDXGISurface *surface, BOOL d3d11 desc.usage = D2D1_RENDER_TARGET_USAGE_NONE; desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT; - return create_render_target_desc(surface, &desc, d3d11); + return create_render_target_desc(surface, &desc, d3d11, factory_type); } #define release_test_context(ctx) release_test_context_(__LINE__, ctx) @@ -1216,8 +1216,9 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c ok_(__FILE__, line)(!ref, "Device has %lu references left.\n", ref); } -#define init_test_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11) -static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx, BOOL d3d11) +#define init_test_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11, D2D1_FACTORY_TYPE_SINGLE_THREADED) +#define init_test_multithreaded_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11, D2D1_FACTORY_TYPE_MULTI_THREADED) +static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx, BOOL d3d11, D2D1_FACTORY_TYPE factory_type) { HRESULT hr; @@ -1237,7 +1238,7 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx, hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface); ok_(__FILE__, line)(hr == S_OK, "Failed to get buffer, hr %#lx.\n", hr); - ctx->rt = create_render_target(ctx->surface, d3d11); + ctx->rt = create_render_target(ctx->surface, d3d11, factory_type); if (!ctx->rt && d3d11) { todo_wine win_skip_(__FILE__, line)("Skipping d3d11 tests.\n"); @@ -4887,7 +4888,7 @@ static void test_alpha_mode(BOOL d3d11) rt_desc.dpiY = 0.0f; rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE; rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT; - rt = create_render_target_desc(ctx.surface, &rt_desc, d3d11); + rt = create_render_target_desc(ctx.surface, &rt_desc, d3d11, D2D1_FACTORY_TYPE_SINGLE_THREADED); ok(!!rt, "Failed to create render target.\n"); ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED); @@ -10694,8 +10695,23 @@ static DWORD WINAPI mt_factory_test_thread_func(void *param) return 0; } +static DWORD WINAPI mt_factory_test_thread_draw_func(void *param) { + ID2D1RenderTarget *rt = param; + D2D1_COLOR_F color; + HRESULT hr; + + ID2D1RenderTarget_BeginDraw(rt); + set_color(&color, 1.0f, 1.0f, 0.0f, 1.0f); + ID2D1RenderTarget_Clear(rt, &color); + hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + return 0; +} + static void test_mt_factory(BOOL d3d11) { + struct d2d1_test_context ctx; ID2D1Multithread *multithread; ID2D1Factory *factory; HANDLE thread; @@ -10750,6 +10766,24 @@ static void test_mt_factory(BOOL d3d11) ID2D1Multithread_Release(multithread); ID2D1Factory_Release(factory); + + if (!init_test_multithreaded_context(&ctx, d3d11)) + return; + + hr = ID2D1Factory_QueryInterface(ctx.factory, &IID_ID2D1Multithread, (void **)&multithread); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + ID2D1Multithread_Enter(multithread); + thread = CreateThread(NULL, 0, mt_factory_test_thread_draw_func, ctx.rt, 0, NULL); + ok(!!thread, "Failed to create a thread.\n"); + ret = WaitForSingleObject(thread, 1000); + todo_wine ok(ret == WAIT_TIMEOUT, "Expected timeout.\n"); + ID2D1Multithread_Leave(multithread); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + ID2D1Multithread_Release(multithread); + release_test_context(&ctx); } #define check_system_properties(effect, is_builtin) check_system_properties_(__LINE__, effect, is_builtin)
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
99
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Results per page:
10
25
50
100
200