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

Alexandre Julliard julliard at winehq.org
Tue Dec 6 15:46:18 CST 2011


Module: wine
Branch: master
Commit: 649e33de58d9e2cdf28850035d25daabe29b14ce
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=649e33de58d9e2cdf28850035d25daabe29b14ce

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec  6 13:31:46 2011 +0100

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

---

 dlls/winex11.drv/graphics.c |    2 +-
 dlls/winex11.drv/init.c     |    7 -------
 2 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c
index 4f76a1f..356f7d7e 100644
--- a/dlls/winex11.drv/graphics.c
+++ b/dlls/winex11.drv/graphics.c
@@ -244,7 +244,7 @@ void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
     RGNDATA *data;
     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 );
     HeapFree( GetProcessHeap(), 0, data );
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 8b3b951..39a57b5 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -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->region = CreateRectRgn( 0, 0, 0, 0 )))
-    {
-        HeapFree( GetProcessHeap(), 0, physDev );
-        return NULL;
-    }
-
     wine_tsx11_lock();
     physDev->drawable = drawable;
     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 );
 
-    DeleteObject( physDev->region );
     wine_tsx11_lock();
     XFreeGC( gdi_display, physDev->gc );
     wine_tsx11_unlock();




More information about the wine-cvs mailing list