Commit 7534d47b authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Pass the total visible region in the SetDeviceClipping driver entry point.

parent 5a1a6e93
......@@ -101,7 +101,7 @@ void CLIPPING_UpdateGCRegion( DC * dc )
if (dc->region) DeleteObject( dc->region );
dc->region = 0;
}
physdev->funcs->pSetDeviceClipping( physdev, dc->hVisRgn, clip_rgn );
physdev->funcs->pSetDeviceClipping( physdev, dc->region );
}
/***********************************************************************
......
......@@ -475,14 +475,15 @@ static INT dibdrv_SetBkMode( PHYSDEV dev, INT mode )
/***********************************************************************
* dibdrv_SetDeviceClipping
*/
static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDeviceClipping );
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
TRACE("(%p, %p, %p)\n", dev, vis_rgn, clip_rgn);
TRACE("(%p, %p)\n", dev, rgn);
CombineRgn( pdev->clip, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY );
return next->funcs->pSetDeviceClipping( next, vis_rgn, clip_rgn);
SetRectRgn( pdev->clip, 0, 0, pdev->dib.width, pdev->dib.height );
if (rgn) CombineRgn( pdev->clip, pdev->clip, rgn, RGN_AND );
return next->funcs->pSetDeviceClipping( next, rgn );
}
/***********************************************************************
......
......@@ -582,7 +582,7 @@ static UINT nulldrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const R
return 0;
}
static void nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
static void nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
{
}
......
......@@ -239,12 +239,12 @@ void restore_clipping_region( X11DRV_PDEVICE *dev, RGNDATA *data )
/***********************************************************************
* X11DRV_SetDeviceClipping
*/
void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
{
RGNDATA *data;
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
CombineRgn( physDev->region, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY );
CombineRgn( physDev->region, rgn, 0, RGN_COPY );
if ((data = X11DRV_GetRegionData( physDev->region, 0 ))) update_x11_clipping( physDev, data );
HeapFree( GetProcessHeap(), 0, data );
......
......@@ -230,7 +230,7 @@ extern HPEN X11DRV_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN;
extern COLORREF X11DRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF X11DRV_SetDCBrushColor( PHYSDEV dev, COLORREF crColor ) DECLSPEC_HIDDEN;
extern COLORREF X11DRV_SetDCPenColor( PHYSDEV dev, COLORREF crColor ) DECLSPEC_HIDDEN;
extern void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn ) DECLSPEC_HIDDEN;
extern void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN rgn ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_SetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
extern UINT X11DRV_SetDIBColorTable( PHYSDEV dev, UINT start, UINT count, const RGBQUAD *colors ) DECLSPEC_HIDDEN;
extern COLORREF X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
......
......@@ -1337,14 +1337,14 @@ static DWORD xrenderdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info
/***********************************************************************
* xrenderdrv_SetDeviceClipping
*/
static void xrenderdrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
static void xrenderdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
{
struct xrender_physdev *physdev = get_xrender_dev( dev );
physdev->update_clip = TRUE;
dev = GET_NEXT_PHYSDEV( dev, pSetDeviceClipping );
dev->funcs->pSetDeviceClipping( dev, vis_rgn, clip_rgn );
dev->funcs->pSetDeviceClipping( dev, rgn );
}
......
......@@ -159,7 +159,7 @@ struct gdi_dc_funcs
COLORREF (*pSetDCPenColor)(PHYSDEV, COLORREF);
UINT (*pSetDIBColorTable)(PHYSDEV,UINT,UINT,const RGBQUAD*);
INT (*pSetDIBitsToDevice)(PHYSDEV,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,LPCVOID,BITMAPINFO*,UINT);
VOID (*pSetDeviceClipping)(PHYSDEV,HRGN,HRGN);
VOID (*pSetDeviceClipping)(PHYSDEV,HRGN);
BOOL (*pSetDeviceGammaRamp)(PHYSDEV,LPVOID);
DWORD (*pSetLayout)(PHYSDEV,DWORD);
INT (*pSetMapMode)(PHYSDEV,INT);
......@@ -205,7 +205,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 19
#define WINE_GDI_DRIVER_VERSION 20
static inline PHYSDEV get_physdev_entry_point( PHYSDEV dev, size_t offset )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment