diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index bcc2932f722..b46521a8de9 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -65,27 +65,6 @@ DWORD nulldrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *inf return dib_driver.pPutImage( NULL, hbitmap, clip, info, bits, src, dst, rop ); } -BOOL nulldrv_CopyBitmap( HBITMAP src, HBITMAP dst ) -{ - BOOL ret = TRUE; - BITMAPOBJ *src_bmp = GDI_GetObjPtr( src, OBJ_BITMAP ); - - if (!src_bmp) return FALSE; - if (src_bmp->dib.dsBm.bmBits) - { - BITMAPOBJ *dst_bmp = GDI_GetObjPtr( dst, OBJ_BITMAP ); - int stride = get_dib_stride( dst_bmp->dib.dsBm.bmWidth, dst_bmp->dib.dsBm.bmBitsPixel ); - dst_bmp->dib.dsBm.bmBits = HeapAlloc( GetProcessHeap(), 0, dst_bmp->dib.dsBm.bmHeight * stride ); - if (dst_bmp->dib.dsBm.bmBits) - memcpy( dst_bmp->dib.dsBm.bmBits, src_bmp->dib.dsBm.bmBits, dst_bmp->dib.dsBm.bmHeight * stride ); - else - ret = FALSE; - GDI_ReleaseObj( dst ); - } - GDI_ReleaseObj( src ); - return ret; -} - /****************************************************************************** * CreateBitmap [GDI32.@] diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index e0dd5992a9e..16440dcbf40 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -97,7 +97,6 @@ BOOL store_brush_pattern( LOGBRUSH *brush, struct brush_pattern *pattern ) { HGLOBAL hmem = 0; - pattern->bitmap = 0; pattern->info = NULL; pattern->bits.free = NULL; diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index c3f6e9db89d..6413654a4be 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -345,14 +345,6 @@ static BOOL dibdrv_DeleteDC( PHYSDEV dev ) return TRUE; } -/*********************************************************************** - * dibdrv_CopyBitmap - */ -static BOOL dibdrv_CopyBitmap( HBITMAP src, HBITMAP dst ) -{ - return nulldrv_CopyBitmap( src, dst ); -} - /*********************************************************************** * dibdrv_DeleteBitmap */ @@ -439,7 +431,6 @@ const struct gdi_dc_funcs dib_driver = NULL, /* pChoosePixelFormat */ dibdrv_Chord, /* pChord */ NULL, /* pCloseFigure */ - dibdrv_CopyBitmap, /* pCopyBitmap */ NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ dibdrv_CreateDC, /* pCreateDC */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 0d84761c07e..d4eae7394fa 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -735,7 +735,6 @@ const struct gdi_dc_funcs null_driver = nulldrv_ChoosePixelFormat, /* pChoosePixelFormat */ nulldrv_Chord, /* pChord */ nulldrv_CloseFigure, /* pCloseFigure */ - nulldrv_CopyBitmap, /* pCopyBitmap */ nulldrv_CreateBitmap, /* pCreateBitmap */ nulldrv_CreateCompatibleDC, /* pCreateCompatibleDC */ nulldrv_CreateDC, /* pCreateDC */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 6dd73ebbde5..691309af50e 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -47,7 +47,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = NULL, /* pChoosePixelFormat */ EMFDRV_Chord, /* pChord */ EMFDRV_CloseFigure, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ NULL, /* pCreateDC */ diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 130966c307e..f96fdcd4e0d 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -7751,7 +7751,6 @@ static const struct gdi_dc_funcs freetype_funcs = NULL, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ freetype_CreateDC, /* pCreateDC */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 36d0131b74d..42bdcf6ccd7 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -362,7 +362,6 @@ extern BOOL nulldrv_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern DWORD nulldrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_bits *bits, struct bitblt_coords *src, struct bitblt_coords *dst, BLENDFUNCTION func ) DECLSPEC_HIDDEN; extern BOOL nulldrv_CloseFigure( PHYSDEV dev ) DECLSPEC_HIDDEN; -extern BOOL nulldrv_CopyBitmap( HBITMAP src, HBITMAP dst ) DECLSPEC_HIDDEN; extern BOOL nulldrv_EndPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern INT nulldrv_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern INT nulldrv_ExtSelectClipRgn( PHYSDEV dev, HRGN rgn, INT mode ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index 1c4b2fa8c78..68cc7362872 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -110,7 +110,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = NULL, /* pChoosePixelFormat */ MFDRV_Chord, /* pChord */ MFDRV_CloseFigure, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ MFDRV_CreateCompatibleDC, /* pCreateCompatibleDC */ NULL, /* pCreateDC */ diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 57b486c1cc9..2f94e7e02f5 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -2244,7 +2244,6 @@ const struct gdi_dc_funcs path_driver = NULL, /* pChoosePixelFormat */ pathdrv_Chord, /* pChord */ pathdrv_CloseFigure, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ pathdrv_CreateDC, /* pCreateDC */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index e27c76cf862..1a1c89fb9b6 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -829,7 +829,6 @@ static const struct gdi_dc_funcs psdrv_funcs = NULL, /* pChoosePixelFormat */ PSDRV_Chord, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ PSDRV_CreateCompatibleDC, /* pCreateCompatibleDC */ PSDRV_CreateDC, /* pCreateDC */ diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c index f00e53040b0..623dbea4d34 100644 --- a/dlls/winex11.drv/bitmap.c +++ b/dlls/winex11.drv/bitmap.c @@ -193,43 +193,6 @@ BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap ) } -/**************************************************************************** - * CopyBitmap (X11DRV.@) - */ -BOOL X11DRV_CopyBitmap( HBITMAP src, HBITMAP dst ) -{ - X_PHYSBITMAP *phys_src, *phys_dst; - BITMAP bitmap; - - if (!(phys_src = X11DRV_get_phys_bitmap( src ))) return FALSE; - if (!GetObjectW( dst, sizeof(bitmap), &bitmap )) return FALSE; - - TRACE("%p->%p %dx%d %d bpp\n", src, dst, bitmap.bmWidth, bitmap.bmHeight, bitmap.bmBitsPixel); - - if (!(phys_dst = X11DRV_init_phys_bitmap( dst ))) return FALSE; - - phys_dst->depth = phys_src->depth; - phys_dst->format = phys_src->format; - phys_dst->trueColor = phys_src->trueColor; - if (phys_dst->trueColor) phys_dst->color_shifts = phys_src->color_shifts; - - wine_tsx11_lock(); - phys_dst->pixmap = XCreatePixmap( gdi_display, root_window, - bitmap.bmWidth, bitmap.bmHeight, phys_dst->depth ); - XCopyArea( gdi_display, phys_src->pixmap, phys_dst->pixmap, - get_bitmap_gc(phys_dst->depth), 0, 0, bitmap.bmWidth, bitmap.bmHeight, 0, 0 ); - wine_tsx11_unlock(); - - if (!phys_dst->pixmap) - { - WARN("Can't create Pixmap\n"); - HeapFree( GetProcessHeap(), 0, phys_dst ); - return FALSE; - } - return TRUE; -} - - /*********************************************************************** * DeleteBitmap (X11DRV.@) */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index d5e06b158ab..20ea0dab06c 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -516,7 +516,6 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_ChoosePixelFormat, /* pChoosePixelFormat */ X11DRV_Chord, /* pChord */ NULL, /* pCloseFigure */ - X11DRV_CopyBitmap, /* pCopyBitmap */ X11DRV_CreateBitmap, /* pCreateBitmap */ X11DRV_CreateCompatibleDC, /* pCreateCompatibleDC */ X11DRV_CreateDC, /* pCreateDC */ diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 68854f068ef..83e45e3bde6 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3935,7 +3935,6 @@ static const struct gdi_dc_funcs glxdrv_funcs = glxdrv_ChoosePixelFormat, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCopyBitmap */ NULL, /* pCreateBitmap */ glxdrv_CreateCompatibleDC, /* pCreateCompatibleDC */ glxdrv_CreateDC, /* pCreateDC */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 7ea816448bd..720f672b6f6 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -173,7 +173,6 @@ extern BOOL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL X11DRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; -extern BOOL X11DRV_CopyBitmap( HBITMAP src, HBITMAP dst ) DECLSPEC_HIDDEN; extern BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap ) DECLSPEC_HIDDEN; extern BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN; extern BOOL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 91a6bd256b3..1f8558fd3f1 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1247,14 +1247,6 @@ static INT xrenderdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID return dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data ); } -/**************************************************************************** - * xrenderdrv_CopyBitmap - */ -static BOOL xrenderdrv_CopyBitmap( HBITMAP src, HBITMAP dst ) -{ - return X11DRV_CopyBitmap( src, dst ); -} - /**************************************************************************** * xrenderdrv_CreateBitmap */ @@ -2635,7 +2627,6 @@ static const struct gdi_dc_funcs xrender_funcs = NULL, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - xrenderdrv_CopyBitmap, /* pCopyBitmap */ xrenderdrv_CreateBitmap, /* pCreateBitmap */ xrenderdrv_CreateCompatibleDC, /* pCreateCompatibleDC */ xrenderdrv_CreateDC, /* pCreateDC */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 47c45aeb82d..3943c2e1abc 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -54,7 +54,6 @@ struct gdi_image_bits struct brush_pattern { - HBITMAP bitmap; /* bitmap handle for DDB patterns */ BITMAPINFO *info; /* DIB info */ struct gdi_image_bits bits; /* DIB bits */ UINT usage; /* color usage for DIB info */ @@ -73,7 +72,6 @@ struct gdi_dc_funcs INT (*pChoosePixelFormat)(PHYSDEV,const PIXELFORMATDESCRIPTOR *); BOOL (*pChord)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); BOOL (*pCloseFigure)(PHYSDEV); - BOOL (*pCopyBitmap)(HBITMAP,HBITMAP); BOOL (*pCreateBitmap)(PHYSDEV,HBITMAP); BOOL (*pCreateCompatibleDC)(PHYSDEV,PHYSDEV*); BOOL (*pCreateDC)(PHYSDEV*,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*); @@ -213,7 +211,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 28 +#define WINE_GDI_DRIVER_VERSION 29 #define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */