diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 5e811cba84e..822f90707ce 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -365,6 +365,10 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc ) if ((brush = GDI_GetObjPtr( handle, OBJ_BRUSH ))) { PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSelectBrush ); + HBITMAP bitmap = brush->bitmap; + BITMAPINFO *info = brush->info; + void *bits = brush->bits.ptr; + UINT usage = brush->usage; if (brush->logbrush.lbStyle == BS_PATTERN) { @@ -380,7 +384,7 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc ) GDI_inc_ref_count( handle ); GDI_ReleaseObj( handle ); - if (!physdev->funcs->pSelectBrush( physdev, handle )) + if (!physdev->funcs->pSelectBrush( physdev, handle, bitmap, info, bits, usage )) { GDI_dec_ref_count( handle ); } diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 74a786dd576..b810e753e4b 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -117,7 +117,8 @@ extern DWORD dibdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAP const struct gdi_image_bits *bits, struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; extern BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; -extern HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN; +extern HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) DECLSPEC_HIDDEN; extern HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN; extern COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; extern COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 6c2469ab7dd..233fa8e0887 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1336,7 +1336,8 @@ void update_brush_rop( dibdrv_physdev *pdev, INT rop ) /*********************************************************************** * dibdrv_SelectBrush */ -HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) +HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectBrush ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); @@ -1420,7 +1421,7 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) break; } - return next->funcs->pSelectBrush( next, hbrush ); + return next->funcs->pSelectBrush( next, hbrush, bitmap, info, bits, usage ); } /*********************************************************************** diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 567bb8d80e6..e76975a112d 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -534,7 +534,8 @@ static HBITMAP nulldrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap ) return bitmap; } -static HBRUSH nulldrv_SelectBrush( PHYSDEV dev, HBRUSH brush ) +static HBRUSH nulldrv_SelectBrush( PHYSDEV dev, HBRUSH brush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { return brush; } diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index a4ee840a45c..d41d88e38d4 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -108,7 +108,8 @@ extern BOOL EMFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, extern BOOL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size ) DECLSPEC_HIDDEN; extern HBITMAP EMFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle ) DECLSPEC_HIDDEN; -extern HBRUSH EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle ) DECLSPEC_HIDDEN; +extern HBRUSH EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode ) DECLSPEC_HIDDEN; extern HFONT EMFDRV_SelectFont( PHYSDEV dev, HFONT handle ) DECLSPEC_HIDDEN; extern HPEN EMFDRV_SelectPen( PHYSDEV dev, HPEN handle ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/enhmfdrv/objects.c b/dlls/gdi32/enhmfdrv/objects.c index 0580700d4cb..52e9cb4b165 100644 --- a/dlls/gdi32/enhmfdrv/objects.c +++ b/dlls/gdi32/enhmfdrv/objects.c @@ -230,7 +230,8 @@ DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) /*********************************************************************** * EMFDRV_SelectBrush */ -HBRUSH EMFDRV_SelectBrush(PHYSDEV dev, HBRUSH hBrush ) +HBRUSH EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH hBrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*)dev; EMRSELECTOBJECT emr; diff --git a/dlls/gdi32/mfdrv/metafiledrv.h b/dlls/gdi32/mfdrv/metafiledrv.h index c4fd2f0cb87..aaea173bf31 100644 --- a/dlls/gdi32/mfdrv/metafiledrv.h +++ b/dlls/gdi32/mfdrv/metafiledrv.h @@ -103,7 +103,8 @@ extern INT MFDRV_SaveDC( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL MFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size ) DECLSPEC_HIDDEN; extern BOOL MFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size ) DECLSPEC_HIDDEN; extern HBITMAP MFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle ) DECLSPEC_HIDDEN; -extern HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle ) DECLSPEC_HIDDEN; +extern HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) DECLSPEC_HIDDEN; extern BOOL MFDRV_SelectClipPath( PHYSDEV dev, INT iMode ) DECLSPEC_HIDDEN; extern HFONT MFDRV_SelectFont( PHYSDEV dev, HFONT handle ) DECLSPEC_HIDDEN; extern HPEN MFDRV_SelectPen( PHYSDEV dev, HPEN handle ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/mfdrv/objects.c b/dlls/gdi32/mfdrv/objects.c index ef0988b6c0d..599f226311c 100644 --- a/dlls/gdi32/mfdrv/objects.c +++ b/dlls/gdi32/mfdrv/objects.c @@ -270,7 +270,8 @@ done: /*********************************************************************** * MFDRV_SelectBrush */ -HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) +HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { INT16 index; diff --git a/dlls/wineps.drv/brush.c b/dlls/wineps.drv/brush.c index 94017468bc2..624e1b184da 100644 --- a/dlls/wineps.drv/brush.c +++ b/dlls/wineps.drv/brush.c @@ -27,7 +27,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv); /*********************************************************************** * SelectBrush (WINEPS.@) */ -HBRUSH PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) +HBRUSH PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { PSDRV_PDEVICE *physDev = get_psdrv_dev( dev ); LOGBRUSH logbrush; diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 6337cb421c2..1b3bb61fb9b 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -455,8 +455,8 @@ extern DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO extern BOOL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL PSDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height ) DECLSPEC_HIDDEN; -extern HBRUSH PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN; -extern HBRUSH PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN; +extern HBRUSH PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) DECLSPEC_HIDDEN; extern HFONT PSDRV_SelectFont( PHYSDEV dev, HFONT hfont ) DECLSPEC_HIDDEN; extern HPEN PSDRV_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN; extern COLORREF PSDRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/brush.c b/dlls/winex11.drv/brush.c index a3c7f28084b..7b7f8cf213b 100644 --- a/dlls/winex11.drv/brush.c +++ b/dlls/winex11.drv/brush.c @@ -280,7 +280,8 @@ static BOOL BRUSH_SelectDIBPatternBrush( X11DRV_PDEVICE *physDev, const BITMAPIN /*********************************************************************** * SelectBrush (X11DRV.@) */ -HBRUSH X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) +HBRUSH X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) { X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); LOGBRUSH logbrush; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 49b97e7c94a..630daf2690e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -220,7 +220,8 @@ extern BOOL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bott extern BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height ) DECLSPEC_HIDDEN; extern HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap ) DECLSPEC_HIDDEN; -extern HBRUSH X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN; +extern HBRUSH X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, + const BITMAPINFO *info, void *bits, UINT usage ) DECLSPEC_HIDDEN; extern HFONT X11DRV_SelectFont( PHYSDEV dev, HFONT hfont ) DECLSPEC_HIDDEN; extern HPEN X11DRV_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN; extern COLORREF X11DRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 4f759b106d9..cb12145cc65 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -146,7 +146,7 @@ struct gdi_dc_funcs BOOL (*pScaleViewportExtEx)(PHYSDEV,INT,INT,INT,INT,SIZE*); BOOL (*pScaleWindowExtEx)(PHYSDEV,INT,INT,INT,INT,SIZE*); HBITMAP (*pSelectBitmap)(PHYSDEV,HBITMAP); - HBRUSH (*pSelectBrush)(PHYSDEV,HBRUSH); + HBRUSH (*pSelectBrush)(PHYSDEV,HBRUSH,HBITMAP,const BITMAPINFO*,void*,UINT); BOOL (*pSelectClipPath)(PHYSDEV,INT); HFONT (*pSelectFont)(PHYSDEV,HFONT); HPALETTE (*pSelectPalette)(PHYSDEV,HPALETTE,BOOL); @@ -204,7 +204,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 17 +#define WINE_GDI_DRIVER_VERSION 18 static inline PHYSDEV get_physdev_entry_point( PHYSDEV dev, size_t offset ) {