Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi.exe16/gdi.c | 11 ----------- dlls/gdi32/dibdrv/dc.c | 2 +- dlls/user32/win.c | 7 ------- dlls/wineandroid.drv/window.c | 19 ++++--------------- dlls/winemac.drv/surface.c | 11 ----------- dlls/winemac.drv/window.c | 6 ++---- dlls/winex11.drv/bitblt.c | 11 ----------- dlls/winex11.drv/window.c | 2 +- include/wine/gdi_driver.h | 1 - 9 files changed, 8 insertions(+), 62 deletions(-)
diff --git a/dlls/gdi.exe16/gdi.c b/dlls/gdi.exe16/gdi.c index 2a0b245e190..f03c8c6fad0 100644 --- a/dlls/gdi.exe16/gdi.c +++ b/dlls/gdi.exe16/gdi.c @@ -472,16 +472,6 @@ static void *CDECL dib_surface_get_bitmap_info( struct window_surface *window_su return surface->bits; }
-/*********************************************************************** - * dib_surface_get_bounds - */ -static RECT *CDECL dib_surface_get_bounds( struct window_surface *window_surface ) -{ - struct dib_window_surface *surface = get_dib_surface( window_surface ); - - return &surface->header.bounds; -} - /*********************************************************************** * dib_surface_set_region */ @@ -514,7 +504,6 @@ static const struct window_surface_funcs dib_surface_funcs = dib_surface_lock, dib_surface_unlock, dib_surface_get_bitmap_info, - dib_surface_get_bounds, dib_surface_set_region, dib_surface_flush, dib_surface_destroy diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index f8b26dc2b8e..1efd4228729 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -832,7 +832,7 @@ void dibdrv_set_window_surface( DC *dc, struct window_surface *surface ) init_dib_info_from_bitmapinfo( &dibdrv->dib, info, bits ); dibdrv->dib.rect = dc->vis_rect; offset_rect( &dibdrv->dib.rect, -dc->device_rect.left, -dc->device_rect.top ); - dibdrv->bounds = surface->funcs->get_bounds( surface ); + dibdrv->bounds = &surface->bounds; DC_InitDC( dc ); } else if (windev) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 680defc2071..279d389f67c 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -556,12 +556,6 @@ 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_bounds; - return &dummy_bounds; -} - static void CDECL dummy_surface_set_region( struct window_surface *window_surface, HRGN region ) { /* nothing to do */ @@ -582,7 +576,6 @@ static const struct window_surface_funcs dummy_surface_funcs = dummy_surface_lock, dummy_surface_unlock, dummy_surface_get_bitmap_info, - dummy_surface_get_bounds, dummy_surface_set_region, dummy_surface_flush, dummy_surface_destroy diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 0f84a186d5d..f7373740c92 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -662,16 +662,6 @@ static void *CDECL android_surface_get_bitmap_info( struct window_surface *windo return surface->bits; }
-/*********************************************************************** - * android_surface_get_bounds - */ -static RECT *CDECL android_surface_get_bounds( struct window_surface *window_surface ) -{ - struct android_window_surface *surface = get_android_surface( window_surface ); - - return &surface->header.bounds; -} - /*********************************************************************** * android_surface_set_region */ @@ -802,7 +792,6 @@ static const struct window_surface_funcs android_surface_funcs = NULL, NULL, android_surface_get_bitmap_info, - android_surface_get_bounds, android_surface_set_region, android_surface_flush, android_surface_destroy @@ -875,7 +864,7 @@ done: window_surface_lock( window_surface ); HeapFree( GetProcessHeap(), 0, surface->region_data ); surface->region_data = data; - *window_surface->funcs->get_bounds( window_surface ) = surface->header.rect; + window_surface->bounds = surface->header.rect; window_surface_unlock( window_surface ); if (region != win_region) DeleteObject( region ); } @@ -941,7 +930,7 @@ static void set_surface_layered( struct window_surface *window_surface, BYTE alp surface->alpha = alpha; set_color_key( surface, color_key ); if (alpha != prev_alpha || surface->color_key != prev_key) /* refresh */ - *window_surface->funcs->get_bounds( window_surface ) = surface->header.rect; + window_surface->bounds = surface->header.rect; window_surface_unlock( window_surface ); }
@@ -1580,7 +1569,7 @@ BOOL CDECL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); - add_bounds_rect( surface->funcs->get_bounds( surface ), &rect ); + add_bounds_rect( &surface->funcs->bounds, &rect ); }
window_surface_unlock( surface ); @@ -1614,7 +1603,7 @@ LRESULT CDECL ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) if (surface) { window_surface_lock( surface ); - *surface->funcs->get_bounds( surface ) = surface->rect; + surface->bounds = surface->rect; window_surface_unlock( surface ); if (is_argb_surface( surface )) surface->funcs->flush( surface ); } diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index 757a0b16cca..abbddd04770 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -124,16 +124,6 @@ static void *CDECL macdrv_surface_get_bitmap_info(struct window_surface *window_ return surface->bits; }
-/*********************************************************************** - * macdrv_surface_get_bounds - */ -static RECT *CDECL macdrv_surface_get_bounds(struct window_surface *window_surface) -{ - struct macdrv_window_surface *surface = get_mac_surface(window_surface); - - return &surface->header.bounds; -} - /*********************************************************************** * macdrv_surface_set_region */ @@ -217,7 +207,6 @@ static const struct window_surface_funcs macdrv_surface_funcs = macdrv_surface_lock, macdrv_surface_unlock, macdrv_surface_get_bitmap_info, - macdrv_surface_get_bounds, macdrv_surface_set_region, macdrv_surface_flush, macdrv_surface_destroy, diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index f2f53520e31..f23ac161244 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -502,14 +502,12 @@ static void sync_window_opacity(struct macdrv_win_data *data, COLORREF key, BYTE
if (needs_flush && data->surface) { - RECT *bounds; RECT rect;
rect = data->whole_rect; OffsetRect(&rect, -data->whole_rect.left, -data->whole_rect.top); window_surface_lock(data->surface); - bounds = data->surface->funcs->get_bounds(data->surface); - add_bounds_rect(bounds, &rect); + add_bounds_rect(&data->surface->bounds, &rect); window_surface_unlock(data->surface); } } @@ -1959,7 +1957,7 @@ BOOL CDECL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO * { window_surface_lock(surface); memcpy(dst_bits, src_bits, bmi->bmiHeader.biSizeImage); - add_bounds_rect(surface->funcs->get_bounds(surface), &rect); + add_bounds_rect(&surface->bounds, &rect); window_surface_unlock(surface); surface->funcs->flush(surface); } diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 44bdb02deb6..c5eec646159 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1823,16 +1823,6 @@ static void *CDECL x11drv_surface_get_bitmap_info( struct window_surface *window return surface->bits; }
-/*********************************************************************** - * x11drv_surface_get_bounds - */ -static RECT *CDECL x11drv_surface_get_bounds( struct window_surface *window_surface ) -{ - struct x11drv_window_surface *surface = get_x11_surface( window_surface ); - - return &surface->header.bounds; -} - /*********************************************************************** * x11drv_surface_set_region */ @@ -1966,7 +1956,6 @@ static const struct window_surface_funcs x11drv_surface_funcs = NULL, NULL, x11drv_surface_get_bitmap_info, - x11drv_surface_get_bounds, x11drv_surface_set_region, x11drv_surface_flush, x11drv_surface_destroy diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index c79305963b9..51078020c2f 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2761,7 +2761,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); - add_bounds_rect( surface->funcs->get_bounds( surface ), &rect ); + add_bounds_rect( &surface->bounds, &rect ); }
window_surface_unlock( surface ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 8cc69521505..c8837c874bf 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -240,7 +240,6 @@ 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 );