mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
gdi32: Remove the CreateBitmap and DeleteBitmap driver entry points.
This commit is contained in:
parent
1416d0e6f1
commit
93758c43fd
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user