winex11: Store the visible region handle directly instead of making a copy.

This commit is contained in:
Alexandre Julliard 2011-12-06 13:31:46 +01:00
parent 7534d47b1b
commit 649e33de58
2 changed files with 1 additions and 8 deletions

View File

@ -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 );

View File

@ -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();