From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/dce.c | 19 ------------------- dlls/win32u/win32u_private.h | 2 -- dlls/win32u/window.c | 13 ++----------- 3 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 79561b109af..72e48c76e55 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -50,9 +50,6 @@ static struct list dce_list = LIST_INIT(dce_list);
#define DCE_CACHE_SIZE 64
-static struct list window_surfaces = LIST_INIT( window_surfaces ); -static pthread_mutex_t surfaces_lock = PTHREAD_MUTEX_INITIALIZER; - static void window_surface_flush( struct window_surface *surface );
/******************************************************************* @@ -748,22 +745,6 @@ void process_wine_present( HWND hwnd ) window_surface_release( surface ); }
-/******************************************************************* - * register_window_surface - * - * Register a window surface in the global list, possibly replacing another one. - */ -void register_window_surface( struct window_surface *old, struct window_surface *new ) -{ - if (old == &dummy_surface) old = NULL; - if (new == &dummy_surface) new = NULL; - if (old == new) return; - pthread_mutex_lock( &surfaces_lock ); - if (old) list_remove( &old->entry ); - if (new) list_add_tail( &window_surfaces, &new->entry ); - pthread_mutex_unlock( &surfaces_lock ); -} - /*********************************************************************** * dump_rdw_flags */ diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 29a3782ed76..77699b003c4 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -51,8 +51,6 @@ extern void erase_now( HWND hwnd, UINT rdw_flags ); extern void move_window_bits( HWND hwnd, const struct window_rects *rects, const RECT *valid_rects ); extern void move_window_bits_surface( HWND hwnd, const RECT *window_rect, struct window_surface *old_surface, const RECT *old_visible_rect, const RECT *valid_rects ); -extern void register_window_surface( struct window_surface *old, - struct window_surface *new );
extern void process_wine_present( HWND hwnd ); extern void window_surface_lock( struct window_surface *surface ); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index ccb561e9b77..c4a1ceb1d37 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2198,7 +2198,6 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru if (ret) { TRACE( "win %p surface %p -> %p\n", hwnd, old_surface, new_surface ); - register_window_surface( old_surface, new_surface ); if (old_surface) { if (valid_rects) @@ -5178,11 +5177,7 @@ LRESULT destroy_window( HWND hwnd )
NtUserDestroyMenu( menu ); NtUserDestroyMenu( sys_menu ); - if (surface) - { - register_window_surface( surface, NULL ); - window_surface_release( surface ); - } + if (surface) window_surface_release( surface );
detach_client_surfaces( hwnd ); if (win->opengl_drawable) opengl_drawable_release( win->opengl_drawable ); @@ -5345,11 +5340,7 @@ void destroy_thread_windows(void)
NtUserDestroyMenu( entry->menu ); NtUserDestroyMenu( entry->sys_menu ); - if (entry->surface) - { - register_window_surface( entry->surface, NULL ); - window_surface_release( entry->surface ); - } + if (entry->surface) window_surface_release( entry->surface ); free( entry ); } }