Alexandre Julliard : gdi32: Pass the total visible region in the SetDeviceClipping driver entry point.
Alexandre Julliard
julliard at winehq.org
Tue Dec 6 15:46:18 CST 2011
Module: wine
Branch: master
Commit: 7534d47b1ba75886297bca2c653a28cc41c2a28e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7534d47b1ba75886297bca2c653a28cc41c2a28e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Dec 6 13:15:35 2011 +0100
gdi32: Pass the total visible region in the SetDeviceClipping driver entry point.
---
dlls/gdi32/clipping.c | 2 +-
dlls/gdi32/dibdrv/dc.c | 9 +++++----
dlls/gdi32/driver.c | 2 +-
dlls/winex11.drv/graphics.c | 4 ++--
dlls/winex11.drv/x11drv.h | 2 +-
dlls/winex11.drv/xrender.c | 4 ++--
include/wine/gdi_driver.h | 4 ++--
7 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/gdi32/clipping.c b/dlls/gdi32/clipping.c
index b4d77d3..7f69950 100644
--- a/dlls/gdi32/clipping.c
+++ b/dlls/gdi32/clipping.c
@@ -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 );
}
/***********************************************************************
diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c
index 8af8c85..f9b5e7b 100644
--- a/dlls/gdi32/dibdrv/dc.c
+++ b/dlls/gdi32/dibdrv/dc.c
@@ -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 );
}
/***********************************************************************
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index 26048b4..15481ac 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -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 )
{
}
diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c
index f2cf037..4f76a1f 100644
--- a/dlls/winex11.drv/graphics.c
+++ b/dlls/winex11.drv/graphics.c
@@ -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 );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index d90968d..f1f22bd 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -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;
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 1c15d2a..5aafd2d 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -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 );
}
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index d996fb4..b3241c0 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -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 )
{
More information about the wine-cvs
mailing list