From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/dce.c | 22 +++++++++++----------- dlls/win32u/win32u_private.h | 7 ++++++- include/wine/gdi_driver.h | 6 ------ 3 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index d1cf5c78bab..be31b909b3f 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -524,8 +524,8 @@ static BOOL update_surface_shape( struct window_surface *surface, const RECT *re return clear_surface_shape( surface ); }
-W32KAPI struct window_surface *window_surface_create( UINT size, const struct window_surface_funcs *funcs, HWND hwnd, - const RECT *rect, BITMAPINFO *info, HBITMAP bitmap ) +struct window_surface *window_surface_create( UINT size, const struct window_surface_funcs *funcs, HWND hwnd, + const RECT *rect, BITMAPINFO *info, HBITMAP bitmap ) { struct window_surface *surface;
@@ -552,12 +552,12 @@ W32KAPI struct window_surface *window_surface_create( UINT size, const struct wi return surface; }
-W32KAPI void window_surface_add_ref( struct window_surface *surface ) +void window_surface_add_ref( struct window_surface *surface ) { InterlockedIncrement( &surface->ref ); }
-W32KAPI void window_surface_release( struct window_surface *surface ) +void window_surface_release( struct window_surface *surface ) { ULONG ret = InterlockedDecrement( &surface->ref ); if (!ret) @@ -571,19 +571,19 @@ W32KAPI void window_surface_release( struct window_surface *surface ) } }
-W32KAPI void window_surface_lock( struct window_surface *surface ) +void window_surface_lock( struct window_surface *surface ) { if (surface == &dummy_surface) return; pthread_mutex_lock( &surface->mutex ); }
-W32KAPI void window_surface_unlock( struct window_surface *surface ) +void window_surface_unlock( struct window_surface *surface ) { if (surface == &dummy_surface) return; pthread_mutex_unlock( &surface->mutex ); }
-void *window_surface_get_color( struct window_surface *surface, BITMAPINFO *info ) +static void *window_surface_get_color( struct window_surface *surface, BITMAPINFO *info ) { struct bitblt_coords coords = {0}; struct gdi_image_bits gdi_bits; @@ -606,7 +606,7 @@ void *window_surface_get_color( struct window_surface *surface, BITMAPINFO *info return gdi_bits.ptr; }
-W32KAPI void window_surface_flush( struct window_surface *surface ) +void window_surface_flush( struct window_surface *surface ) { char color_buf[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; char shape_buf[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; @@ -641,7 +641,7 @@ W32KAPI void window_surface_flush( struct window_surface *surface ) window_surface_unlock( surface ); }
-W32KAPI void window_surface_set_layered( struct window_surface *surface, COLORREF color_key, UINT alpha_bits, UINT alpha_mask ) +void window_surface_set_layered( struct window_surface *surface, COLORREF color_key, UINT alpha_bits, UINT alpha_mask ) { char color_buf[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; BITMAPINFO *color_info = (BITMAPINFO *)color_buf; @@ -670,7 +670,7 @@ W32KAPI void window_surface_set_layered( struct window_surface *surface, COLORRE window_surface_unlock( surface ); }
-W32KAPI void window_surface_set_clip( struct window_surface *surface, HRGN clip_region ) +void window_surface_set_clip( struct window_surface *surface, HRGN clip_region ) { window_surface_lock( surface );
@@ -703,7 +703,7 @@ W32KAPI void window_surface_set_clip( struct window_surface *surface, HRGN clip_ window_surface_unlock( surface ); }
-W32KAPI void window_surface_set_shape( struct window_surface *surface, HRGN shape_region ) +void window_surface_set_shape( struct window_surface *surface, HRGN shape_region ) { window_surface_lock( surface );
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 4c7ce21d5b4..60c3edb787b 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -54,7 +54,12 @@ extern void move_window_bits_surface( HWND hwnd, const RECT *window_rect, struct const RECT *old_visible_rect, const RECT *valid_rects ); extern void register_window_surface( struct window_surface *old, struct window_surface *new ); -extern void *window_surface_get_color( struct window_surface *surface, BITMAPINFO *info ); + +extern void window_surface_lock( struct window_surface *surface ); +extern void window_surface_unlock( struct window_surface *surface ); +extern void window_surface_flush( struct window_surface *surface ); +extern void window_surface_set_clip( struct window_surface *surface, HRGN clip_region ); +extern void window_surface_set_layered( struct window_surface *surface, COLORREF color_key, UINT alpha_bits, UINT alpha_mask );
/* defwnd.c */ extern BOOL adjust_window_rect( RECT *rect, DWORD style, BOOL menu, DWORD ex_style, UINT dpi ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index abf1b699cab..ef264cace97 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -317,13 +317,7 @@ W32KAPI struct window_surface *window_surface_create( UINT size, const struct wi const RECT *rect, BITMAPINFO *info, HBITMAP bitmap ); W32KAPI void window_surface_add_ref( struct window_surface *surface ); W32KAPI void window_surface_release( struct window_surface *surface ); -W32KAPI void window_surface_lock( struct window_surface *surface ); -W32KAPI void window_surface_unlock( struct window_surface *surface ); -W32KAPI void window_surface_set_layered( struct window_surface *surface, COLORREF color_key, UINT alpha_bits, UINT alpha_mask ); -W32KAPI void window_surface_flush( struct window_surface *surface ); -W32KAPI void window_surface_set_clip( struct window_surface *surface, HRGN clip_region ); W32KAPI void window_surface_set_shape( struct window_surface *surface, HRGN shape_region ); -W32KAPI void window_surface_set_layered( struct window_surface *surface, COLORREF color_key, UINT alpha_bits, UINT alpha_mask );
/* display manager interface, used to initialize display device registry data */