winex11: Store the visible region handle directly instead of making a copy.
This commit is contained in:
parent
7534d47b1b
commit
649e33de58
|
@ -244,7 +244,7 @@ void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
|
||||||
RGNDATA *data;
|
RGNDATA *data;
|
||||||
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
||||||
|
|
||||||
CombineRgn( physDev->region, rgn, 0, RGN_COPY );
|
physDev->region = rgn;
|
||||||
|
|
||||||
if ((data = X11DRV_GetRegionData( physDev->region, 0 ))) update_x11_clipping( physDev, data );
|
if ((data = X11DRV_GetRegionData( physDev->region, 0 ))) update_x11_clipping( physDev, data );
|
||||||
HeapFree( GetProcessHeap(), 0, data );
|
HeapFree( GetProcessHeap(), 0, data );
|
||||||
|
|
|
@ -126,12 +126,6 @@ static X11DRV_PDEVICE *create_x11_physdev( Drawable drawable )
|
||||||
|
|
||||||
if (!(physDev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physDev) ))) return NULL;
|
if (!(physDev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physDev) ))) return NULL;
|
||||||
|
|
||||||
if (!(physDev->region = CreateRectRgn( 0, 0, 0, 0 )))
|
|
||||||
{
|
|
||||||
HeapFree( GetProcessHeap(), 0, physDev );
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
physDev->drawable = drawable;
|
physDev->drawable = drawable;
|
||||||
physDev->gc = XCreateGC( gdi_display, drawable, 0, NULL );
|
physDev->gc = XCreateGC( gdi_display, drawable, 0, NULL );
|
||||||
|
@ -193,7 +187,6 @@ static BOOL X11DRV_DeleteDC( PHYSDEV dev )
|
||||||
{
|
{
|
||||||
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
||||||
|
|
||||||
DeleteObject( physDev->region );
|
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
XFreeGC( gdi_display, physDev->gc );
|
XFreeGC( gdi_display, physDev->gc );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
|
|
Loading…
Reference in New Issue