win32u: Don't use CDECL for window surface functions.

They are no longer used from PE code.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2022-03-21 14:14:10 +01:00 committed by Alexandre Julliard
parent 39ef9c3ad8
commit 747f7b543c
5 changed files with 54 additions and 50 deletions

View File

@ -56,17 +56,17 @@ static pthread_mutex_t surfaces_lock = PTHREAD_MUTEX_INITIALIZER;
* Dummy window surface for windows that shouldn't get painted.
*/
static void CDECL dummy_surface_lock( struct window_surface *window_surface )
static void dummy_surface_lock( struct window_surface *window_surface )
{
/* nothing to do */
}
static void CDECL dummy_surface_unlock( struct window_surface *window_surface )
static void dummy_surface_unlock( struct window_surface *window_surface )
{
/* nothing to do */
}
static void *CDECL dummy_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
static void *dummy_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
{
static DWORD dummy_data;
@ -84,23 +84,23 @@ static void *CDECL dummy_surface_get_bitmap_info( struct window_surface *window_
return &dummy_data;
}
static RECT *CDECL dummy_surface_get_bounds( struct window_surface *window_surface )
static RECT *dummy_surface_get_bounds( struct window_surface *window_surface )
{
static RECT dummy_bounds;
return &dummy_bounds;
}
static void CDECL dummy_surface_set_region( struct window_surface *window_surface, HRGN region )
static void dummy_surface_set_region( struct window_surface *window_surface, HRGN region )
{
/* nothing to do */
}
static void CDECL dummy_surface_flush( struct window_surface *window_surface )
static void dummy_surface_flush( struct window_surface *window_surface )
{
/* nothing to do */
}
static void CDECL dummy_surface_destroy( struct window_surface *window_surface )
static void dummy_surface_destroy( struct window_surface *window_surface )
{
/* nothing to do */
}
@ -139,36 +139,36 @@ static struct offscreen_window_surface *impl_from_window_surface( struct window_
return CONTAINING_RECORD( base, struct offscreen_window_surface, header );
}
static void CDECL offscreen_window_surface_lock( struct window_surface *base )
static void offscreen_window_surface_lock( struct window_surface *base )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
pthread_mutex_lock( &impl->mutex );
}
static void CDECL offscreen_window_surface_unlock( struct window_surface *base )
static void offscreen_window_surface_unlock( struct window_surface *base )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
pthread_mutex_unlock( &impl->mutex );
}
static RECT *CDECL offscreen_window_surface_get_bounds( struct window_surface *base )
static RECT *offscreen_window_surface_get_bounds( struct window_surface *base )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
return &impl->bounds;
}
static void *CDECL offscreen_window_surface_get_bitmap_info( struct window_surface *base, BITMAPINFO *info )
static void *offscreen_window_surface_get_bitmap_info( struct window_surface *base, BITMAPINFO *info )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
info->bmiHeader = impl->info.bmiHeader;
return impl->bits;
}
static void CDECL offscreen_window_surface_set_region( struct window_surface *base, HRGN region )
static void offscreen_window_surface_set_region( struct window_surface *base, HRGN region )
{
}
static void CDECL offscreen_window_surface_flush( struct window_surface *base )
static void offscreen_window_surface_flush( struct window_surface *base )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
base->funcs->lock( base );
@ -176,7 +176,7 @@ static void CDECL offscreen_window_surface_flush( struct window_surface *base )
base->funcs->unlock( base );
}
static void CDECL offscreen_window_surface_destroy( struct window_surface *base )
static void offscreen_window_surface_destroy( struct window_surface *base )
{
struct offscreen_window_surface *impl = impl_from_window_surface( base );
free( impl );
@ -264,7 +264,7 @@ static struct dib_window_surface *get_dib_surface( struct window_surface *surfac
/***********************************************************************
* dib_surface_lock
*/
static void CDECL dib_surface_lock( struct window_surface *window_surface )
static void dib_surface_lock( struct window_surface *window_surface )
{
/* nothing to do */
}
@ -272,7 +272,7 @@ static void CDECL dib_surface_lock( struct window_surface *window_surface )
/***********************************************************************
* dib_surface_unlock
*/
static void CDECL dib_surface_unlock( struct window_surface *window_surface )
static void dib_surface_unlock( struct window_surface *window_surface )
{
/* nothing to do */
}
@ -280,7 +280,7 @@ static void CDECL dib_surface_unlock( struct window_surface *window_surface )
/***********************************************************************
* dib_surface_get_bitmap_info
*/
static void *CDECL dib_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
static void *dib_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
{
struct dib_window_surface *surface = get_dib_surface( window_surface );
@ -291,7 +291,7 @@ static void *CDECL dib_surface_get_bitmap_info( struct window_surface *window_su
/***********************************************************************
* dib_surface_get_bounds
*/
static RECT *CDECL dib_surface_get_bounds( struct window_surface *window_surface )
static RECT *dib_surface_get_bounds( struct window_surface *window_surface )
{
struct dib_window_surface *surface = get_dib_surface( window_surface );
@ -301,7 +301,7 @@ static RECT *CDECL dib_surface_get_bounds( struct window_surface *window_surface
/***********************************************************************
* dib_surface_set_region
*/
static void CDECL dib_surface_set_region( struct window_surface *window_surface, HRGN region )
static void dib_surface_set_region( struct window_surface *window_surface, HRGN region )
{
/* nothing to do */
}
@ -309,7 +309,7 @@ static void CDECL dib_surface_set_region( struct window_surface *window_surface,
/***********************************************************************
* dib_surface_flush
*/
static void CDECL dib_surface_flush( struct window_surface *window_surface )
static void dib_surface_flush( struct window_surface *window_surface )
{
/* nothing to do */
}
@ -317,7 +317,7 @@ static void CDECL dib_surface_flush( struct window_surface *window_surface )
/***********************************************************************
* dib_surface_destroy
*/
static void CDECL dib_surface_destroy( struct window_surface *window_surface )
static void dib_surface_destroy( struct window_surface *window_surface )
{
struct dib_window_surface *surface = get_dib_surface( window_surface );

View File

@ -652,7 +652,7 @@ static void apply_line_region( DWORD *dst, int width, int x, int y, const RECT *
/***********************************************************************
* android_surface_lock
*/
static void CDECL android_surface_lock( struct window_surface *window_surface )
static void android_surface_lock( struct window_surface *window_surface )
{
struct android_window_surface *surface = get_android_surface( window_surface );
@ -662,7 +662,7 @@ static void CDECL android_surface_lock( struct window_surface *window_surface )
/***********************************************************************
* android_surface_unlock
*/
static void CDECL android_surface_unlock( struct window_surface *window_surface )
static void android_surface_unlock( struct window_surface *window_surface )
{
struct android_window_surface *surface = get_android_surface( window_surface );
@ -672,7 +672,7 @@ static void CDECL android_surface_unlock( struct window_surface *window_surface
/***********************************************************************
* android_surface_get_bitmap_info
*/
static void *CDECL android_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
static void *android_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
{
struct android_window_surface *surface = get_android_surface( window_surface );
@ -683,7 +683,7 @@ static void *CDECL android_surface_get_bitmap_info( struct window_surface *windo
/***********************************************************************
* android_surface_get_bounds
*/
static RECT *CDECL android_surface_get_bounds( struct window_surface *window_surface )
static RECT *android_surface_get_bounds( struct window_surface *window_surface )
{
struct android_window_surface *surface = get_android_surface( window_surface );
@ -693,7 +693,7 @@ static RECT *CDECL android_surface_get_bounds( struct window_surface *window_sur
/***********************************************************************
* android_surface_set_region
*/
static void CDECL android_surface_set_region( struct window_surface *window_surface, HRGN region )
static void android_surface_set_region( struct window_surface *window_surface, HRGN region )
{
struct android_window_surface *surface = get_android_surface( window_surface );
@ -717,7 +717,7 @@ static void CDECL android_surface_set_region( struct window_surface *window_surf
/***********************************************************************
* android_surface_flush
*/
static void CDECL android_surface_flush( struct window_surface *window_surface )
static void android_surface_flush( struct window_surface *window_surface )
{
struct android_window_surface *surface = get_android_surface( window_surface );
ANativeWindow_Buffer buffer;
@ -800,7 +800,7 @@ static void CDECL android_surface_flush( struct window_surface *window_surface )
/***********************************************************************
* android_surface_destroy
*/
static void CDECL android_surface_destroy( struct window_surface *window_surface )
static void android_surface_destroy( struct window_surface *window_surface )
{
struct android_window_surface *surface = get_android_surface( window_surface );

View File

@ -96,7 +96,7 @@ static void update_blit_data(struct macdrv_window_surface *surface)
/***********************************************************************
* macdrv_surface_lock
*/
static void CDECL macdrv_surface_lock(struct window_surface *window_surface)
static void macdrv_surface_lock(struct window_surface *window_surface)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@ -106,7 +106,7 @@ static void CDECL macdrv_surface_lock(struct window_surface *window_surface)
/***********************************************************************
* macdrv_surface_unlock
*/
static void CDECL macdrv_surface_unlock(struct window_surface *window_surface)
static void macdrv_surface_unlock(struct window_surface *window_surface)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@ -116,7 +116,7 @@ static void CDECL macdrv_surface_unlock(struct window_surface *window_surface)
/***********************************************************************
* macdrv_surface_get_bitmap_info
*/
static void *CDECL macdrv_surface_get_bitmap_info(struct window_surface *window_surface,
static void *macdrv_surface_get_bitmap_info(struct window_surface *window_surface,
BITMAPINFO *info)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@ -128,7 +128,7 @@ static void *CDECL macdrv_surface_get_bitmap_info(struct window_surface *window_
/***********************************************************************
* macdrv_surface_get_bounds
*/
static RECT *CDECL macdrv_surface_get_bounds(struct window_surface *window_surface)
static RECT *macdrv_surface_get_bounds(struct window_surface *window_surface)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@ -138,7 +138,7 @@ static RECT *CDECL macdrv_surface_get_bounds(struct window_surface *window_surfa
/***********************************************************************
* macdrv_surface_set_region
*/
static void CDECL macdrv_surface_set_region(struct window_surface *window_surface, HRGN region)
static void macdrv_surface_set_region(struct window_surface *window_surface, HRGN region)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
@ -164,7 +164,7 @@ static void CDECL macdrv_surface_set_region(struct window_surface *window_surfac
/***********************************************************************
* macdrv_surface_flush
*/
static void CDECL macdrv_surface_flush(struct window_surface *window_surface)
static void macdrv_surface_flush(struct window_surface *window_surface)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
CGRect rect;
@ -200,7 +200,7 @@ static void CDECL macdrv_surface_flush(struct window_surface *window_surface)
/***********************************************************************
* macdrv_surface_destroy
*/
static void CDECL macdrv_surface_destroy(struct window_surface *window_surface)
static void macdrv_surface_destroy(struct window_surface *window_surface)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);

View File

@ -1817,7 +1817,7 @@ failed:
/***********************************************************************
* x11drv_surface_lock
*/
static void CDECL x11drv_surface_lock( struct window_surface *window_surface )
static void x11drv_surface_lock( struct window_surface *window_surface )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@ -1827,7 +1827,7 @@ static void CDECL x11drv_surface_lock( struct window_surface *window_surface )
/***********************************************************************
* x11drv_surface_unlock
*/
static void CDECL x11drv_surface_unlock( struct window_surface *window_surface )
static void x11drv_surface_unlock( struct window_surface *window_surface )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@ -1837,7 +1837,7 @@ static void CDECL x11drv_surface_unlock( struct window_surface *window_surface )
/***********************************************************************
* x11drv_surface_get_bitmap_info
*/
static void *CDECL x11drv_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
static void *x11drv_surface_get_bitmap_info( struct window_surface *window_surface, BITMAPINFO *info )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@ -1848,7 +1848,7 @@ static void *CDECL x11drv_surface_get_bitmap_info( struct window_surface *window
/***********************************************************************
* x11drv_surface_get_bounds
*/
static RECT *CDECL x11drv_surface_get_bounds( struct window_surface *window_surface )
static RECT *x11drv_surface_get_bounds( struct window_surface *window_surface )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@ -1858,7 +1858,7 @@ static RECT *CDECL x11drv_surface_get_bounds( struct window_surface *window_surf
/***********************************************************************
* x11drv_surface_set_region
*/
static void CDECL x11drv_surface_set_region( struct window_surface *window_surface, HRGN region )
static void x11drv_surface_set_region( struct window_surface *window_surface, HRGN region )
{
RGNDATA *data;
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
@ -1889,7 +1889,7 @@ static void CDECL x11drv_surface_set_region( struct window_surface *window_surfa
/***********************************************************************
* x11drv_surface_flush
*/
static void CDECL x11drv_surface_flush( struct window_surface *window_surface )
static void x11drv_surface_flush( struct window_surface *window_surface )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
unsigned char *src = surface->bits;
@ -1956,7 +1956,7 @@ static void CDECL x11drv_surface_flush( struct window_surface *window_surface )
/***********************************************************************
* x11drv_surface_destroy
*/
static void CDECL x11drv_surface_destroy( struct window_surface *window_surface )
static void x11drv_surface_destroy( struct window_surface *window_surface )
{
struct x11drv_window_surface *surface = get_x11_surface( window_surface );

View File

@ -165,7 +165,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 75
#define WINE_GDI_DRIVER_VERSION 76
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
@ -195,15 +195,17 @@ static inline void push_dc_driver( PHYSDEV *dev, PHYSDEV physdev, const struct g
struct window_surface;
#ifndef __WINE_USE_MSVCRT
struct window_surface_funcs
{
void (CDECL *lock)( struct window_surface *surface );
void (CDECL *unlock)( struct window_surface *surface );
void* (CDECL *get_info)( struct window_surface *surface, BITMAPINFO *info );
RECT* (CDECL *get_bounds)( struct window_surface *surface );
void (CDECL *set_region)( struct window_surface *surface, HRGN region );
void (CDECL *flush)( struct window_surface *surface );
void (CDECL *destroy)( struct window_surface *surface );
void (*lock)( struct window_surface *surface );
void (*unlock)( struct window_surface *surface );
void* (*get_info)( struct window_surface *surface, BITMAPINFO *info );
RECT* (*get_bounds)( struct window_surface *surface );
void (*set_region)( struct window_surface *surface, HRGN region );
void (*flush)( struct window_surface *surface );
void (*destroy)( struct window_surface *surface );
};
struct window_surface
@ -227,6 +229,8 @@ static inline ULONG window_surface_release( struct window_surface *surface )
return ret;
}
#endif /* __WINE_USE_MSVCRT */
/* display manager interface, used to initialize display device registry data */
struct gdi_gpu