Commit bcc65899 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Remove DIB locking calls from all graphics functions.

parent dcbfd3d0
......@@ -3777,24 +3777,6 @@ INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev, INT req)
return X11DRV_DIB_Coerce(physDev->bitmap, req);
}
/***********************************************************************
* X11DRV_LockDIBSection
*/
INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev, INT req)
{
if (!physDev || !physDev->bitmap) return DIB_Status_None;
return X11DRV_DIB_Lock(physDev->bitmap, req);
}
/***********************************************************************
* X11DRV_UnlockDIBSection
*/
void X11DRV_UnlockDIBSection(X11DRV_PDEVICE *physDev, BOOL commit)
{
if (!physDev || !physDev->bitmap) return;
X11DRV_DIB_Unlock(physDev->bitmap, commit);
}
#ifdef HAVE_LIBXXSHM
/***********************************************************************
......
......@@ -47,7 +47,6 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
XFontStruct* font;
BOOL rotated = FALSE;
XChar2b *str2b = NULL;
BOOL dibUpdateFlag = FALSE;
BOOL result = TRUE;
if (!pfo)
......@@ -71,8 +70,6 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
if (flags & ETO_OPAQUE)
{
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
dibUpdateFlag = TRUE;
wine_tsx11_lock();
XSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
......@@ -92,14 +89,6 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
DeleteObject( clip_region );
}
/* Draw the text background if necessary */
if (!dibUpdateFlag)
{
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
dibUpdateFlag = TRUE;
}
/* Draw the text (count > 0 verified) */
if (!(str2b = X11DRV_cptable[pfo->fi->cptable].punicode_to_char2b( pfo, wstr, count )))
......@@ -181,7 +170,6 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
END:
HeapFree( GetProcessHeap(), 0, str2b );
if (dibUpdateFlag) X11DRV_UnlockDIBSection( physDev, TRUE );
if (restore_region) restore_clipping_region( physDev );
return result;
}
......
......@@ -463,8 +463,6 @@ extern const dib_conversions dib_normal DECLSPEC_HIDDEN, dib_src_byteswap DECLSP
extern INT X11DRV_DIB_MaskToShift(DWORD mask) DECLSPEC_HIDDEN;
extern INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev,INT) DECLSPEC_HIDDEN;
extern INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev,INT) DECLSPEC_HIDDEN;
extern void X11DRV_UnlockDIBSection(X11DRV_PDEVICE *physDev,BOOL) DECLSPEC_HIDDEN;
extern INT X11DRV_DIB_Lock(X_PHYSBITMAP *,INT) DECLSPEC_HIDDEN;
extern void X11DRV_DIB_Unlock(X_PHYSBITMAP *,BOOL) DECLSPEC_HIDDEN;
......
......@@ -1751,8 +1751,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
XChangeGC( gdi_display, physdev->x11dev->gc, GCFunction | GCBackground | GCFillStyle, &xgcval );
wine_tsx11_unlock();
X11DRV_LockDIBSection( physdev->x11dev, DIB_Status_GdiMod );
if(physdev->x11dev->depth == 1) {
if((physdev->x11dev->textPixel & 0xffffff) == 0) {
textPixel = 0;
......@@ -1776,11 +1774,7 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
wine_tsx11_unlock();
}
if(count == 0)
{
X11DRV_UnlockDIBSection( physdev->x11dev, TRUE );
return TRUE;
}
if(count == 0) return TRUE;
EnterCriticalSection(&xrender_cs);
......@@ -1802,7 +1796,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
{
WARN("could not upload requested glyphs\n");
LeaveCriticalSection(&xrender_cs);
X11DRV_UnlockDIBSection( physdev->x11dev, TRUE );
return FALSE;
}
......@@ -1871,7 +1864,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
HeapFree(GetProcessHeap(), 0, elts);
LeaveCriticalSection(&xrender_cs);
X11DRV_UnlockDIBSection( physdev->x11dev, TRUE );
return TRUE;
}
......
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