diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 6413654a4be..5c59041fe45 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_DeleteBitmap - */ -static BOOL dibdrv_DeleteBitmap( HBITMAP bitmap ) -{ - return TRUE; -} - /*********************************************************************** * dibdrv_SelectBitmap */ @@ -431,10 +423,8 @@ const struct gdi_dc_funcs dib_driver = NULL, /* pChoosePixelFormat */ dibdrv_Chord, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ dibdrv_CreateDC, /* pCreateDC */ - dibdrv_DeleteBitmap, /* pDeleteBitmap */ dibdrv_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 4b7118ef5f4..2b8059a57cb 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -209,11 +209,6 @@ static BOOL nulldrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom return TRUE; } -static BOOL nulldrv_CreateBitmap( PHYSDEV dev, HBITMAP bitmap ) -{ - return TRUE; -} - static BOOL nulldrv_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev ) { if (!display_driver || !display_driver->funcs->pCreateCompatibleDC) return TRUE; @@ -227,11 +222,6 @@ static BOOL nulldrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device, return FALSE; } -static BOOL nulldrv_DeleteBitmap( HBITMAP bitmap ) -{ - return TRUE; -} - static BOOL nulldrv_DeleteDC( PHYSDEV dev ) { assert(0); /* should never be called */ @@ -748,10 +738,8 @@ const struct gdi_dc_funcs null_driver = nulldrv_ChoosePixelFormat, /* pChoosePixelFormat */ nulldrv_Chord, /* pChord */ nulldrv_CloseFigure, /* pCloseFigure */ - nulldrv_CreateBitmap, /* pCreateBitmap */ nulldrv_CreateCompatibleDC, /* pCreateCompatibleDC */ nulldrv_CreateDC, /* pCreateDC */ - nulldrv_DeleteBitmap, /* pDeleteBitmap */ nulldrv_DeleteDC, /* pDeleteDC */ nulldrv_DeleteObject, /* pDeleteObject */ nulldrv_DescribePixelFormat, /* pDescribePixelFormat */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 691309af50e..7649e008eea 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -47,10 +47,8 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = NULL, /* pChoosePixelFormat */ EMFDRV_Chord, /* pChord */ EMFDRV_CloseFigure, /* pCloseFigure */ - NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ NULL, /* pCreateDC */ - NULL, /* pDeleteBitmap */ EMFDRV_DeleteDC, /* pDeleteDC */ EMFDRV_DeleteObject, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index f96fdcd4e0d..35ba2c9dc13 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -7751,10 +7751,8 @@ static const struct gdi_dc_funcs freetype_funcs = NULL, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ freetype_CreateDC, /* pCreateDC */ - NULL, /* pDeleteBitmap */ freetype_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index 68cc7362872..029f12e9124 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -110,10 +110,8 @@ static const struct gdi_dc_funcs MFDRV_Funcs = NULL, /* pChoosePixelFormat */ MFDRV_Chord, /* pChord */ MFDRV_CloseFigure, /* pCloseFigure */ - NULL, /* pCreateBitmap */ MFDRV_CreateCompatibleDC, /* pCreateCompatibleDC */ NULL, /* pCreateDC */ - NULL, /* pDeleteBitmap */ MFDRV_DeleteDC, /* pDeleteDC */ MFDRV_DeleteObject, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 2f94e7e02f5..9c845e6db3e 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -2244,10 +2244,8 @@ const struct gdi_dc_funcs path_driver = NULL, /* pChoosePixelFormat */ pathdrv_Chord, /* pChord */ pathdrv_CloseFigure, /* pCloseFigure */ - NULL, /* pCreateBitmap */ NULL, /* pCreateCompatibleDC */ pathdrv_CreateDC, /* pCreateDC */ - NULL, /* pDeleteBitmap */ pathdrv_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 1a1c89fb9b6..3d9bf38fa08 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -829,10 +829,8 @@ static const struct gdi_dc_funcs psdrv_funcs = NULL, /* pChoosePixelFormat */ PSDRV_Chord, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCreateBitmap */ PSDRV_CreateCompatibleDC, /* pCreateCompatibleDC */ PSDRV_CreateDC, /* pCreateDC */ - NULL, /* pDeleteBitmap */ PSDRV_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c index 623dbea4d34..27723ef92fb 100644 --- a/dlls/winex11.drv/bitmap.c +++ b/dlls/winex11.drv/bitmap.c @@ -164,54 +164,6 @@ X_PHYSBITMAP *X11DRV_create_phys_bitmap( HBITMAP hbitmap, const BITMAP *bitmap, } -/**************************************************************************** - * CreateBitmap (X11DRV.@) - * - * Create a device dependent X11 bitmap - * - * Returns TRUE on success else FALSE - */ -BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap ) -{ - BITMAP bitmap; - X_PHYSBITMAP *phys_bitmap; - - if (!GetObjectW( hbitmap, sizeof(bitmap), &bitmap )) return FALSE; - - if (bitmap.bmBitsPixel == 1) - { - if (!(phys_bitmap = X11DRV_create_phys_bitmap( hbitmap, &bitmap, 1 ))) return FALSE; - phys_bitmap->trueColor = FALSE; - } - else - { - if (!(phys_bitmap = X11DRV_create_phys_bitmap( hbitmap, &bitmap, screen_depth ))) return FALSE; - phys_bitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor); - phys_bitmap->color_shifts = X11DRV_PALETTE_default_shifts; - } - return TRUE; -} - - -/*********************************************************************** - * DeleteBitmap (X11DRV.@) - */ -BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap ) -{ - X_PHYSBITMAP *physBitmap = X11DRV_get_phys_bitmap( hbitmap ); - - if (physBitmap) - { - wine_tsx11_lock(); - if (physBitmap->pixmap) XFreePixmap( gdi_display, physBitmap->pixmap ); - XDeleteContext( gdi_display, (XID)hbitmap, bitmap_context ); - wine_tsx11_unlock(); - HeapFree( GetProcessHeap(), 0, physBitmap ); - } - return TRUE; -} - - /*********************************************************************** * X11DRV_get_phys_bitmap * diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 20ea0dab06c..f548792fa9e 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -516,10 +516,8 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_ChoosePixelFormat, /* pChoosePixelFormat */ X11DRV_Chord, /* pChord */ NULL, /* pCloseFigure */ - X11DRV_CreateBitmap, /* pCreateBitmap */ X11DRV_CreateCompatibleDC, /* pCreateCompatibleDC */ X11DRV_CreateDC, /* pCreateDC */ - X11DRV_DeleteBitmap, /* pDeleteBitmap */ X11DRV_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ X11DRV_DescribePixelFormat, /* pDescribePixelFormat */ diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 83e45e3bde6..697b8d49f17 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3935,10 +3935,8 @@ static const struct gdi_dc_funcs glxdrv_funcs = glxdrv_ChoosePixelFormat, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - NULL, /* pCreateBitmap */ glxdrv_CreateCompatibleDC, /* pCreateCompatibleDC */ glxdrv_CreateDC, /* pCreateDC */ - NULL, /* pDeleteBitmap */ glxdrv_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ glxdrv_DescribePixelFormat, /* pDescribePixelFormat */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 53a6d42a390..0b10ecf9509 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -173,8 +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_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; extern INT X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam ) DECLSPEC_HIDDEN; extern BOOL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 5837148340e..7986ae73969 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -515,22 +515,6 @@ static enum wxr_format get_xrender_format_from_bitmapinfo( const BITMAPINFO *inf return WXR_INVALID_FORMAT; } -static enum wxr_format get_bitmap_format( int bpp ) -{ - enum wxr_format format = WXR_INVALID_FORMAT; - - if (bpp == screen_bpp) - { - switch (bpp) - { - case 16: format = WXR_FORMAT_R5G6B5; break; - case 24: format = WXR_FORMAT_R8G8B8; break; - case 32: format = WXR_FORMAT_A8R8G8B8; break; - } - } - return format; -} - /* Set the x/y scaling and x/y offsets in the transformation matrix of the source picture */ static void set_xrender_transformation(Picture src_pict, double xscale, double yscale, int xoffset, int yoffset) { @@ -1247,55 +1231,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_CreateBitmap - */ -static BOOL xrenderdrv_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap ) -{ - enum wxr_format format = WXR_INVALID_FORMAT; - X_PHYSBITMAP *phys_bitmap; - BITMAP bitmap; - - if (!GetObjectW( hbitmap, sizeof(bitmap), &bitmap )) return FALSE; - - if (bitmap.bmBitsPixel == 1) - { - if (!(phys_bitmap = X11DRV_create_phys_bitmap( hbitmap, &bitmap, 1 ))) return FALSE; - phys_bitmap->format = WXR_FORMAT_MONO; - phys_bitmap->trueColor = FALSE; - } - else - { - format = get_bitmap_format( bitmap.bmBitsPixel ); - - if (pict_formats[format]) - { - if (!(phys_bitmap = X11DRV_create_phys_bitmap( hbitmap, &bitmap, pict_formats[format]->depth ))) - return FALSE; - phys_bitmap->format = format; - phys_bitmap->trueColor = TRUE; - phys_bitmap->color_shifts = wxr_color_shifts[format]; - } - else - { - if (!(phys_bitmap = X11DRV_create_phys_bitmap( hbitmap, &bitmap, screen_depth ))) - return FALSE; - phys_bitmap->format = WXR_INVALID_FORMAT; - phys_bitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor); - phys_bitmap->color_shifts = X11DRV_PALETTE_default_shifts; - } - } - return TRUE; -} - -/**************************************************************************** - * xrenderdrv_DeleteBitmap - */ -static BOOL xrenderdrv_DeleteBitmap( HBITMAP hbitmap ) -{ - return X11DRV_DeleteBitmap( hbitmap ); -} - /*********************************************************************** * xrenderdrv_SelectBitmap */ @@ -2590,10 +2525,8 @@ static const struct gdi_dc_funcs xrender_funcs = NULL, /* pChoosePixelFormat */ NULL, /* pChord */ NULL, /* pCloseFigure */ - xrenderdrv_CreateBitmap, /* pCreateBitmap */ xrenderdrv_CreateCompatibleDC, /* pCreateCompatibleDC */ xrenderdrv_CreateDC, /* pCreateDC */ - xrenderdrv_DeleteBitmap, /* pDeleteBitmap */ xrenderdrv_DeleteDC, /* pDeleteDC */ NULL, /* pDeleteObject */ NULL, /* pDescribePixelFormat */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 34ad521f0e6..fffc459b2d6 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -72,10 +72,8 @@ struct gdi_dc_funcs INT (*pChoosePixelFormat)(PHYSDEV,const PIXELFORMATDESCRIPTOR *); BOOL (*pChord)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); BOOL (*pCloseFigure)(PHYSDEV); - BOOL (*pCreateBitmap)(PHYSDEV,HBITMAP); BOOL (*pCreateCompatibleDC)(PHYSDEV,PHYSDEV*); BOOL (*pCreateDC)(PHYSDEV*,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*); - BOOL (*pDeleteBitmap)(HBITMAP); BOOL (*pDeleteDC)(PHYSDEV); BOOL (*pDeleteObject)(PHYSDEV,HGDIOBJ); INT (*pDescribePixelFormat)(PHYSDEV,INT,UINT,PIXELFORMATDESCRIPTOR *); @@ -211,7 +209,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 30 +#define WINE_GDI_DRIVER_VERSION 31 #define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */