Commit 22ae3bd1 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

psdrv doesn't care about hGCClipRgn, just use GetClipRgn instead.

parent 4aa2c81d
......@@ -27,30 +27,36 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
/***********************************************************************
* PSDRV_SetDeviceClipping
*/
VOID PSDRV_SetDeviceClipping( PSDRV_PDEVICE *physDev, HRGN hrgn )
VOID PSDRV_SetDeviceClipping( PSDRV_PDEVICE *physDev, HRGN ignored )
{
CHAR szArrayName[] = "clippath";
DWORD size;
RGNDATA *rgndata;
RGNDATA *rgndata = NULL;
HRGN hrgn = CreateRectRgn(0,0,0,0);
BOOL empty;
TRACE("hdc=%04x\n", physDev->hdc);
empty = !GetClipRgn(physDev->hdc, hrgn);
/* We really shouldn't be using initclip */
PSDRV_WriteInitClip(physDev);
if(!empty) {
size = GetRegionData(hrgn, 0, NULL);
if(!size) {
ERR("Invalid region\n");
return;
goto end;
}
rgndata = HeapAlloc( GetProcessHeap(), 0, size );
if(!rgndata) {
ERR("Can't allocate buffer\n");
return;
goto end;
}
GetRegionData(hrgn, size, rgndata);
PSDRV_WriteInitClip(physDev);
/* check for NULL region */
if (rgndata->rdh.nCount == 0)
{
......@@ -84,10 +90,10 @@ VOID PSDRV_SetDeviceClipping( PSDRV_PDEVICE *physDev, HRGN hrgn )
PSDRV_WriteArrayPut(physDev, szArrayName, i * 4 + 3,
pRect->bottom - pRect->top);
}
PSDRV_WriteRectClip2(physDev, szArrayName);
}
HeapFree( GetProcessHeap(), 0, rgndata );
return;
}
end:
if(rgndata) HeapFree( GetProcessHeap(), 0, rgndata );
DeleteObject(hrgn);
}
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