From d08fbfc3b0151368f01ccc7feacd605622500425 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 21 Sep 2007 10:47:45 +0200 Subject: [PATCH] winex11.drv: Don't call GDI functions while holding the xrender lock. --- dlls/winex11.drv/xrender.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index b659e2192ab..cbf83bc4dd0 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1130,7 +1130,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag { RGNDATA *data; XGCValues xgcval; - int render_op = PictOpOver; gsCacheEntry *entry; gsCacheEntryFormat *formatEntry; BOOL retv = FALSE; @@ -1215,8 +1214,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag DeleteObject( clip_region ); } - EnterCriticalSection(&xrender_cs); - if(X11DRV_XRender_Installed) { if(!physDev->xrender->pict) { XRenderPictureAttributes pa; @@ -1245,15 +1242,10 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag wine_tsx11_unlock(); HeapFree( GetProcessHeap(), 0, data ); } - - tile_pict = get_tile_pict(depth_type, physDev->textPixel); - - /* FIXME the mapping of Text/BkColor onto 1 or 0 needs investigation. - */ - if((depth_type == mono_drawable) && (textPixel == 0)) - render_op = PictOpOutReverse; /* This gives us 'black' text */ } + EnterCriticalSection(&xrender_cs); + entry = glyphsetCache + physDev->xrender->cache_index; if( disable_antialias == FALSE ) aa_type = entry->aa_default; @@ -1285,6 +1277,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag XGlyphElt16 *elts = HeapAlloc(GetProcessHeap(), 0, sizeof(XGlyphElt16) * count); INT offset = 0; POINT desired, current; + int render_op = PictOpOver; /* There's a bug in XRenderCompositeText that ignores the xDst and yDst parameters. So we pass zeros to the function and move to our starting position using the first @@ -1294,6 +1287,13 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag desired.y = physDev->dc_rect.top + y; current.x = current.y = 0; + tile_pict = get_tile_pict(depth_type, physDev->textPixel); + + /* FIXME the mapping of Text/BkColor onto 1 or 0 needs investigation. + */ + if((depth_type == mono_drawable) && (textPixel == 0)) + render_op = PictOpOutReverse; /* This gives us 'black' text */ + for(idx = 0; idx < count; idx++) { elts[idx].glyphset = formatEntry->glyphset;