winex11: Remove remaining X11 locking around graphics calls.
This commit is contained in:
parent
6bfcb347bf
commit
6f6217e9a4
|
@ -600,8 +600,6 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, cons
|
|||
INT width = visRectDst->right - visRectDst->left;
|
||||
INT height = visRectDst->bottom - visRectDst->top;
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
||||
if (!X11DRV_PALETTE_XPixelToPalette || (physDev->depth == 1) ||
|
||||
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
||||
{
|
||||
|
@ -633,8 +631,6 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, cons
|
|||
XDestroyImage( image );
|
||||
}
|
||||
}
|
||||
|
||||
wine_tsx11_unlock();
|
||||
return exposures;
|
||||
}
|
||||
|
||||
|
@ -707,7 +703,6 @@ void execute_rop( X11DRV_PDEVICE *physdev, Pixmap src_pixmap, GC gc, const RECT
|
|||
if (use_dst) BITBLT_GetDstArea( physdev, pixmaps[DST], gc, visrect );
|
||||
null_brush = use_pat && !X11DRV_SetupGCForPatBlt( physdev, gc, TRUE );
|
||||
|
||||
wine_tsx11_lock();
|
||||
for ( ; *opcode; opcode++)
|
||||
{
|
||||
if (OP_DST(*opcode) == DST) result = pixmaps[DST];
|
||||
|
@ -737,7 +732,6 @@ void execute_rop( X11DRV_PDEVICE *physdev, Pixmap src_pixmap, GC gc, const RECT
|
|||
physdev->exposures += BITBLT_PutDstArea( physdev, result, visrect );
|
||||
XFreePixmap( gdi_display, pixmaps[DST] );
|
||||
if (pixmaps[TMP]) XFreePixmap( gdi_display, pixmaps[TMP] );
|
||||
wine_tsx11_unlock();
|
||||
add_device_bounds( physdev, visrect );
|
||||
}
|
||||
|
||||
|
@ -752,7 +746,6 @@ BOOL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
|
|||
|
||||
if (usePat && !X11DRV_SetupGCForBrush( physDev )) return TRUE;
|
||||
|
||||
wine_tsx11_lock();
|
||||
XSetFunction( gdi_display, physDev->gc, OP_ROP(*opcode) );
|
||||
|
||||
switch(rop) /* a few special cases */
|
||||
|
@ -789,7 +782,6 @@ BOOL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
|
|||
physDev->dc_rect.top + dst->visrect.top,
|
||||
dst->visrect.right - dst->visrect.left,
|
||||
dst->visrect.bottom - dst->visrect.top );
|
||||
wine_tsx11_unlock();
|
||||
add_device_bounds( physDev, &dst->visrect );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -828,7 +820,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
{
|
||||
if (same_format(physDevSrc, physDevDst))
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
|
||||
XCopyArea( gdi_display, physDevSrc->drawable,
|
||||
physDevDst->drawable, physDevDst->gc,
|
||||
|
@ -838,7 +829,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
physDevDst->dc_rect.left + dst->visrect.left,
|
||||
physDevDst->dc_rect.top + dst->visrect.top );
|
||||
physDevDst->exposures++;
|
||||
wine_tsx11_unlock();
|
||||
return TRUE;
|
||||
}
|
||||
if (physDevSrc->depth == 1)
|
||||
|
@ -846,7 +836,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
int text_pixel = X11DRV_PALETTE_ToPhysical( physDevDst, GetTextColor(physDevDst->dev.hdc) );
|
||||
int bkgnd_pixel = X11DRV_PALETTE_ToPhysical( physDevDst, GetBkColor(physDevDst->dev.hdc) );
|
||||
|
||||
wine_tsx11_lock();
|
||||
XSetBackground( gdi_display, physDevDst->gc, text_pixel );
|
||||
XSetForeground( gdi_display, physDevDst->gc, bkgnd_pixel );
|
||||
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
|
||||
|
@ -858,12 +847,10 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
physDevDst->dc_rect.left + dst->visrect.left,
|
||||
physDevDst->dc_rect.top + dst->visrect.top, 1 );
|
||||
physDevDst->exposures++;
|
||||
wine_tsx11_unlock();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
gc = XCreateGC( gdi_display, physDevDst->drawable, 0, NULL );
|
||||
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
||||
XSetGraphicsExposures( gdi_display, gc, False );
|
||||
|
@ -902,7 +889,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
physDevSrc->dc_rect.top + src->visrect.top,
|
||||
width, height, 0, 0 );
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
|
||||
execute_rop( physDevDst, src_pixmap, gc, &dst->visrect, rop );
|
||||
|
||||
|
|
|
@ -226,7 +226,6 @@ static BOOL select_pattern_brush( X11DRV_PDEVICE *physdev, const struct brush_pa
|
|||
pixmap = create_pixmap_from_image( physdev->dev.hdc, &vis, info, &pattern->bits, pattern->usage );
|
||||
if (!pixmap) return FALSE;
|
||||
|
||||
wine_tsx11_lock();
|
||||
if (physdev->brush.pixmap) XFreePixmap( gdi_display, physdev->brush.pixmap );
|
||||
physdev->brush.pixmap = pixmap;
|
||||
|
||||
|
@ -240,7 +239,6 @@ static BOOL select_pattern_brush( X11DRV_PDEVICE *physdev, const struct brush_pa
|
|||
physdev->brush.fillStyle = FillTiled;
|
||||
physdev->brush.pixel = 0; /* Ignored */
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -364,7 +364,6 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||
{
|
||||
register int x, y;
|
||||
XImage *image;
|
||||
wine_tsx11_lock();
|
||||
pixmap = XCreatePixmap( gdi_display, root_window, 8, 8, physDev->depth );
|
||||
image = XGetImage( gdi_display, physDev->brush.pixmap, 0, 0, 8, 8,
|
||||
AllPlanes, ZPixmap );
|
||||
|
@ -374,7 +373,6 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
|||
X11DRV_PALETTE_XPixelToPalette[XGetPixel( image, x, y)] );
|
||||
XPutImage( gdi_display, pixmap, gc, image, 0, 0, 0, 0, 8, 8 );
|
||||
XDestroyImage( image );
|
||||
wine_tsx11_unlock();
|
||||
val.tile = pixmap;
|
||||
}
|
||||
else val.tile = physDev->brush.pixmap;
|
||||
|
@ -631,7 +629,6 @@ static BOOL X11DRV_DrawArc( PHYSDEV dev, INT left, INT top, INT right, INT botto
|
|||
|
||||
if (X11DRV_SetupGCForPen( physDev ))
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||
physDev->dc_rect.left + rc.left, physDev->dc_rect.top + rc.top,
|
||||
rc.right-rc.left-1, rc.bottom-rc.top-1, istart_angle, idiff_angle );
|
||||
|
@ -691,7 +688,6 @@ static BOOL X11DRV_DrawArc( PHYSDEV dev, INT left, INT top, INT right, INT botto
|
|||
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||
points, lines+1, CoordModeOrigin );
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
physDev->pen.width = oldwidth;
|
||||
|
@ -871,7 +867,6 @@ BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
|
||||
if (X11DRV_SetupGCForBrush( physDev ))
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
if (ell_width > (rc.right-rc.left) )
|
||||
if (ell_height > (rc.bottom-rc.top) )
|
||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||
|
@ -933,7 +928,6 @@ BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
rc.right - rc.left - 2,
|
||||
rc.bottom - rc.top - ell_height - 1);
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
/* FIXME: this could be done with on X call
|
||||
* more efficient and probably more correct
|
||||
|
@ -946,7 +940,6 @@ BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
*/
|
||||
if (X11DRV_SetupGCForPen( physDev ))
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
if (ell_width > (rc.right-rc.left) )
|
||||
if (ell_height > (rc.bottom-rc.top) )
|
||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||
|
@ -1010,7 +1003,6 @@ BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
physDev->dc_rect.left + rc.left,
|
||||
physDev->dc_rect.top + rc.bottom - (ell_height+1) / 2);
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
physDev->pen.width = oldwidth;
|
||||
|
@ -1509,7 +1501,6 @@ static unsigned char *get_icm_profile( unsigned long *size )
|
|||
unsigned long count, remaining;
|
||||
unsigned char *profile, *ret = NULL;
|
||||
|
||||
wine_tsx11_lock();
|
||||
XGetWindowProperty( gdi_display, DefaultRootWindow(gdi_display),
|
||||
x11drv_atom(_ICC_PROFILE), 0, ~0UL, False, AnyPropertyType,
|
||||
&type, &format, &count, &remaining, &profile );
|
||||
|
@ -1519,7 +1510,6 @@ static unsigned char *get_icm_profile( unsigned long *size )
|
|||
if ((ret = HeapAlloc( GetProcessHeap(), 0, *size ))) memcpy( ret, profile, *size );
|
||||
XFree( profile );
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -966,7 +966,6 @@ static Cursor create_xlib_monochrome_cursor( HDC hdc, const ICONINFOEXW *icon, i
|
|||
bits.is_copy = TRUE;
|
||||
if (!(src_pixmap = create_pixmap_from_image( hdc, &vis, info, &bits, DIB_RGB_COLORS ))) goto done;
|
||||
|
||||
wine_tsx11_lock();
|
||||
bits_pixmap = XCreatePixmap( gdi_display, root_window, width, height, 1 );
|
||||
mask_pixmap = XCreatePixmap( gdi_display, root_window, width, height, 1 );
|
||||
gc = XCreateGC( gdi_display, src_pixmap, 0, NULL );
|
||||
|
@ -1012,7 +1011,6 @@ static Cursor create_xlib_monochrome_cursor( HDC hdc, const ICONINFOEXW *icon, i
|
|||
XFreePixmap( gdi_display, src_pixmap );
|
||||
XFreePixmap( gdi_display, bits_pixmap );
|
||||
XFreePixmap( gdi_display, mask_pixmap );
|
||||
wine_tsx11_unlock();
|
||||
|
||||
done:
|
||||
HeapFree( GetProcessHeap(), 0, mask_bits );
|
||||
|
@ -1134,7 +1132,6 @@ static Cursor create_xlib_color_cursor( HDC hdc, const ICONINFOEXW *icon, int wi
|
|||
bits.ptr = mask_bits;
|
||||
mask_pixmap = create_pixmap_from_image( hdc, &vis, info, &bits, DIB_RGB_COLORS );
|
||||
|
||||
wine_tsx11_lock();
|
||||
if (mask_pixmap)
|
||||
{
|
||||
cursor = XCreatePixmapCursor( gdi_display, xor_pixmap, mask_pixmap,
|
||||
|
@ -1142,7 +1139,6 @@ static Cursor create_xlib_color_cursor( HDC hdc, const ICONINFOEXW *icon, int wi
|
|||
XFreePixmap( gdi_display, mask_pixmap );
|
||||
}
|
||||
XFreePixmap( gdi_display, xor_pixmap );
|
||||
wine_tsx11_unlock();
|
||||
|
||||
done:
|
||||
HeapFree( GetProcessHeap(), 0, color_bits );
|
||||
|
|
|
@ -335,7 +335,6 @@ static int GLXErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static BOOL infoInitialized = FALSE;
|
||||
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
||||
{
|
||||
int screen = DefaultScreen(gdi_display);
|
||||
|
@ -348,16 +347,10 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
|||
BOOL ret = FALSE;
|
||||
int attribList[] = {GLX_RGBA, GLX_DOUBLEBUFFER, None};
|
||||
|
||||
if (infoInitialized)
|
||||
return TRUE;
|
||||
infoInitialized = TRUE;
|
||||
|
||||
attr.override_redirect = True;
|
||||
attr.colormap = None;
|
||||
attr.border_pixel = 0;
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
||||
vis = pglXChooseVisual(gdi_display, screen, attribList);
|
||||
if (vis) {
|
||||
#ifdef __i386__
|
||||
|
@ -460,7 +453,6 @@ done:
|
|||
}
|
||||
if (win != root) XDestroyWindow( gdi_display, win );
|
||||
if (attr.colormap) XFreeColormap( gdi_display, attr.colormap );
|
||||
wine_tsx11_unlock();
|
||||
if (!ret) ERR(" couldn't initialize OpenGL, expect problems\n");
|
||||
return ret;
|
||||
}
|
||||
|
@ -560,11 +552,9 @@ static BOOL has_opengl(void)
|
|||
|
||||
if(!X11DRV_WineGL_InitOpenglInfo()) goto failed;
|
||||
|
||||
wine_tsx11_lock();
|
||||
if (pglXQueryExtension(gdi_display, &error_base, &event_base)) {
|
||||
TRACE("GLX is up and running error_base = %d\n", error_base);
|
||||
} else {
|
||||
wine_tsx11_unlock();
|
||||
ERR( "GLX extension is missing, disabling OpenGL.\n" );
|
||||
goto failed;
|
||||
}
|
||||
|
@ -629,8 +619,6 @@ static BOOL has_opengl(void)
|
|||
}
|
||||
|
||||
X11DRV_WineGL_LoadExtensions();
|
||||
|
||||
wine_tsx11_unlock();
|
||||
return TRUE;
|
||||
|
||||
failed:
|
||||
|
@ -1201,8 +1189,6 @@ static int glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
|
|||
ppfd->dwFlags = PFD_SUPPORT_OPENGL;
|
||||
/* Now the flags extracted from the Visual */
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
||||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
|
||||
if(value & GLX_WINDOW_BIT)
|
||||
ppfd->dwFlags |= PFD_DRAW_TO_WINDOW;
|
||||
|
@ -1288,8 +1274,6 @@ static int glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
|
|||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_STENCIL_SIZE, &value);
|
||||
ppfd->cStencilBits = value;
|
||||
|
||||
wine_tsx11_unlock();
|
||||
|
||||
ppfd->iLayerType = PFD_MAIN_PLANE;
|
||||
|
||||
if (TRACE_ON(wgl)) {
|
||||
|
@ -1388,7 +1372,6 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM
|
|||
if (TRACE_ON(wgl)) {
|
||||
int gl_test = 0;
|
||||
|
||||
wine_tsx11_lock();
|
||||
gl_test = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_FBCONFIG_ID, &value);
|
||||
if (gl_test) {
|
||||
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
|
||||
|
@ -1400,7 +1383,6 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM
|
|||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
|
||||
TRACE(" - DRAWABLE_TYPE 0x%x\n", value);
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -2300,7 +2282,6 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
|
|||
WARN("Unable to convert iPixelFormat %d to a GLX one!\n", iPixelFormat);
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
for (i = 0; i < nAttributes; ++i) {
|
||||
const int curWGLAttr = piAttributes[i];
|
||||
TRACE("pAttr[%d] = %x\n", i, curWGLAttr);
|
||||
|
@ -2506,16 +2487,13 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
|
|||
piValues[i] = GL_FALSE;
|
||||
}
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
return GL_TRUE;
|
||||
|
||||
get_error:
|
||||
wine_tsx11_unlock();
|
||||
ERR("(%p): unexpected failure on GetFBConfigAttrib(%x) returns FALSE\n", hdc, curGLXAttr);
|
||||
return GL_FALSE;
|
||||
|
||||
pix_error:
|
||||
wine_tsx11_unlock();
|
||||
ERR("(%p): unexpected iPixelFormat(%d) vs nFormats(%d), returns FALSE\n", hdc, iPixelFormat, nWGLFormats);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
@ -2578,7 +2556,6 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
|
|||
Drawable prev_drawable;
|
||||
GLXContext tmp_context;
|
||||
|
||||
wine_tsx11_lock();
|
||||
prev_context = pglXGetCurrentContext();
|
||||
prev_drawable = pglXGetCurrentDrawable();
|
||||
|
||||
|
@ -2607,7 +2584,6 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
|
|||
/* Switch back to the original drawable and upload the pbuffer-texture */
|
||||
pglXMakeCurrent(gdi_display, prev_drawable, prev_context);
|
||||
pglXDestroyContext(gdi_display, tmp_context);
|
||||
wine_tsx11_unlock();
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,6 @@ int X11DRV_PALETTE_Init(void)
|
|||
X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_VIRTUAL;
|
||||
case GrayScale:
|
||||
case PseudoColor:
|
||||
wine_tsx11_lock();
|
||||
if (private_color_map)
|
||||
{
|
||||
XSetWindowAttributes win_attr;
|
||||
|
@ -182,7 +181,6 @@ int X11DRV_PALETTE_Init(void)
|
|||
X11DRV_PALETTE_PaletteXColormap = XCreateColormap(gdi_display, root_window,
|
||||
visual, AllocNone);
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
break;
|
||||
|
||||
case StaticGray:
|
||||
|
@ -199,7 +197,6 @@ int X11DRV_PALETTE_Init(void)
|
|||
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
|
||||
* depths 1 and 4
|
||||
*/
|
||||
wine_tsx11_lock();
|
||||
depths = XListDepths(gdi_display,DefaultScreen(gdi_display),&nrofdepths);
|
||||
if ((nrofdepths==2) && ((depths[0]==4) || depths[1]==4)) {
|
||||
monoPlane = 1;
|
||||
|
@ -217,7 +214,6 @@ int X11DRV_PALETTE_Init(void)
|
|||
X11DRV_PALETTE_ComputeColorShifts(&X11DRV_PALETTE_default_shifts, visual->red_mask, visual->green_mask, visual->blue_mask);
|
||||
}
|
||||
XFree(depths);
|
||||
wine_tsx11_unlock();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -347,7 +343,6 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
|||
|
||||
/* Allocate system palette colors */
|
||||
|
||||
wine_tsx11_lock();
|
||||
for( i=0; i < palette_size; i++ )
|
||||
{
|
||||
if( i < NB_RESERVED_COLORS/2 )
|
||||
|
@ -379,7 +374,6 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
|||
else if (i >= palette_size - 8 )
|
||||
X11DRV_PALETTE_mapEGAPixel[i - (palette_size - 16)] = color.pixel;
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
|
||||
X11DRV_PALETTE_XPixelToPalette = X11DRV_PALETTE_PaletteToXPixel = NULL;
|
||||
|
||||
|
@ -416,7 +410,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
|||
if (copy_default_colors > 256) copy_default_colors = 256;
|
||||
for (i = 0; i < copy_default_colors; i++)
|
||||
defaultColors[i].pixel = (long) i;
|
||||
wine_tsx11_lock();
|
||||
XQueryColors(gdi_display, defaultCM, &defaultColors[0], copy_default_colors);
|
||||
for (i = 0; i < copy_default_colors; i++)
|
||||
XAllocColor( gdi_display, X11DRV_PALETTE_PaletteXColormap, &defaultColors[i] );
|
||||
|
@ -490,7 +483,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
|||
else if (i >= NB_RESERVED_COLORS - 8 )
|
||||
X11DRV_PALETTE_mapEGAPixel[i - (NB_RESERVED_COLORS-16)] = color.pixel;
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
|
||||
/* now allocate changeable set */
|
||||
|
||||
|
@ -509,7 +501,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
/* comment this out if you want to debug palette init */
|
||||
XGrabServer(gdi_display);
|
||||
|
||||
|
@ -543,7 +534,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
|||
palette_size = c_min + NB_RESERVED_COLORS;
|
||||
|
||||
XUngrabServer(gdi_display);
|
||||
wine_tsx11_unlock();
|
||||
|
||||
TRACE("adjusted size %i colorcells\n", palette_size);
|
||||
}
|
||||
|
@ -666,8 +656,6 @@ static void X11DRV_PALETTE_FillDefaultColors( const PALETTEENTRY *sys_pal_templa
|
|||
inc_g = (255 - NB_COLORCUBE_START_INDEX)/no_g;
|
||||
inc_b = (255 - NB_COLORCUBE_START_INDEX)/no_b;
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
||||
idx = X11DRV_PALETTE_firstFree;
|
||||
|
||||
if( idx != -1 )
|
||||
|
@ -737,7 +725,6 @@ static void X11DRV_PALETTE_FillDefaultColors( const PALETTEENTRY *sys_pal_templa
|
|||
}
|
||||
COLOR_gapFilled = idx - COLOR_gapStart;
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -315,7 +315,6 @@ static int load_xrender_formats(void)
|
|||
|
||||
if(is_wxrformat_compatible_with_default_visual(&wxr_formats_template[i]))
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
pict_formats[i] = pXRenderFindVisualFormat(gdi_display, visual);
|
||||
if (!pict_formats[i])
|
||||
{
|
||||
|
@ -331,7 +330,6 @@ static int load_xrender_formats(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
if (pict_formats[i]) default_format = i;
|
||||
}
|
||||
else
|
||||
|
@ -603,7 +601,6 @@ static void free_xrender_picture( struct xrender_physdev *dev )
|
|||
{
|
||||
if (dev->pict || dev->pict_src)
|
||||
{
|
||||
wine_tsx11_lock();
|
||||
XFlush( gdi_display );
|
||||
if (dev->pict)
|
||||
{
|
||||
|
@ -617,7 +614,6 @@ static void free_xrender_picture( struct xrender_physdev *dev )
|
|||
pXRenderFreePicture(gdi_display, dev->pict_src);
|
||||
dev->pict_src = 0;
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -627,7 +623,7 @@ static Picture get_no_alpha_mask(void)
|
|||
static Pixmap pixmap;
|
||||
static Picture pict;
|
||||
|
||||
wine_tsx11_lock();
|
||||
EnterCriticalSection( &xrender_cs );
|
||||
if (!pict)
|
||||
{
|
||||
XRenderPictureAttributes pa;
|
||||
|
@ -642,7 +638,7 @@ static Picture get_no_alpha_mask(void)
|
|||
col.alpha = 0;
|
||||
pXRenderFillRectangle( gdi_display, PictOpSrc, pict, &col, 0, 0, 1, 1 );
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
LeaveCriticalSection( &xrender_cs );
|
||||
return pict;
|
||||
}
|
||||
|
||||
|
@ -983,7 +979,6 @@ static int GetCacheEntry( HDC hdc, LFANDSIZE *plfsz )
|
|||
char *value;
|
||||
BOOL antialias = TRUE;
|
||||
|
||||
wine_tsx11_lock();
|
||||
if ((value = XGetDefault( gdi_display, "Xft", "antialias" )))
|
||||
{
|
||||
if (tolower(value[0]) == 'f' || tolower(value[0]) == 'n' ||
|
||||
|
@ -999,7 +994,6 @@ static int GetCacheEntry( HDC hdc, LFANDSIZE *plfsz )
|
|||
else if (!strcmp( value, "vbgr" )) entry->aa_default = AA_VBGR;
|
||||
else if (!strcmp( value, "none" )) entry->aa_default = AA_Grey;
|
||||
}
|
||||
wine_tsx11_unlock();
|
||||
if (!antialias) font_smoothing = FALSE;
|
||||
}
|
||||
|
||||
|
@ -1644,7 +1638,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
|||
}
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
/* Make sure we don't have any transforms set from a previous call */
|
||||
set_xrender_transformation(pict, 1, 1, 0, 0);
|
||||
pXRenderCompositeText16(gdi_display, render_op,
|
||||
|
@ -1652,7 +1645,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
|||
pict,
|
||||
formatEntry->font_format,
|
||||
0, 0, 0, 0, elts, count);
|
||||
wine_tsx11_unlock();
|
||||
HeapFree(GetProcessHeap(), 0, elts);
|
||||
|
||||
LeaveCriticalSection(&xrender_cs);
|
||||
|
@ -1669,7 +1661,6 @@ static void multiply_alpha( Picture pict, XRenderPictFormat *format, int alpha,
|
|||
Picture src_pict, mask_pict;
|
||||
XRenderColor color;
|
||||
|
||||
wine_tsx11_lock();
|
||||
src_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
||||
mask_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
||||
pa.repeat = RepeatNormal;
|
||||
|
@ -1686,7 +1677,6 @@ static void multiply_alpha( Picture pict, XRenderPictFormat *format, int alpha,
|
|||
pXRenderFreePicture( gdi_display, mask_pict );
|
||||
XFreePixmap( gdi_display, src_pixmap );
|
||||
XFreePixmap( gdi_display, mask_pixmap );
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
/* Helper function for (stretched) blitting using xrender */
|
||||
|
@ -1721,7 +1711,6 @@ static void xrender_blit( int op, Picture src_pict, Picture mask_pict, Picture d
|
|||
/* When we need to scale we perform scaling and source_x / source_y translation using a transformation matrix.
|
||||
* This is needed because XRender is inaccurate in combination with scaled source coordinates passed to XRenderComposite.
|
||||
* In all other cases we do use XRenderComposite for translation as it is faster than using a transformation matrix. */
|
||||
wine_tsx11_lock();
|
||||
if(xscale != 1.0 || yscale != 1.0)
|
||||
{
|
||||
/* In case of mirroring we need a source x- and y-offset because without the pixels will be
|
||||
|
@ -1739,7 +1728,6 @@ static void xrender_blit( int op, Picture src_pict, Picture mask_pict, Picture d
|
|||
}
|
||||
pXRenderComposite( gdi_display, op, src_pict, mask_pict, dst_pict,
|
||||
x_offset, y_offset, 0, 0, x_dst, y_dst, width_dst, height_dst );
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
/* Helper function for (stretched) mono->color blitting using xrender */
|
||||
|
@ -1783,7 +1771,6 @@ static void xrender_mono_blit( Picture src_pict, Picture dst_pict,
|
|||
color.alpha = 0xffff; /* tile pict needs 100% alpha */
|
||||
tile_pict = get_tile_pict( dst_format, &color );
|
||||
|
||||
wine_tsx11_lock();
|
||||
pXRenderFillRectangle( gdi_display, PictOpSrc, dst_pict, fg, x_dst, y_dst, width_dst, height_dst );
|
||||
|
||||
if (xscale != 1.0 || yscale != 1.0)
|
||||
|
@ -1803,7 +1790,6 @@ static void xrender_mono_blit( Picture src_pict, Picture dst_pict,
|
|||
}
|
||||
pXRenderComposite(gdi_display, PictOpOver, tile_pict, src_pict, dst_pict,
|
||||
0, 0, x_offset, y_offset, x_dst, y_dst, width_dst, height_dst );
|
||||
wine_tsx11_unlock();
|
||||
LeaveCriticalSection( &xrender_cs );
|
||||
|
||||
/* force the alpha channel for background pixels, it has been set to 100% by the tile */
|
||||
|
@ -2056,7 +2042,6 @@ static DWORD xrenderdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
|
|||
tmp.y -= tmp.visrect.top;
|
||||
OffsetRect( &tmp.visrect, -tmp.visrect.left, -tmp.visrect.top );
|
||||
|
||||
wine_tsx11_lock();
|
||||
gc = XCreateGC( gdi_display, physdev->x11dev->drawable, 0, NULL );
|
||||
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
||||
XSetGraphicsExposures( gdi_display, gc, False );
|
||||
|
@ -2064,7 +2049,6 @@ static DWORD xrenderdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
|
|||
tmp.visrect.right - tmp.visrect.left,
|
||||
tmp.visrect.bottom - tmp.visrect.top,
|
||||
physdev->pict_format->depth );
|
||||
wine_tsx11_unlock();
|
||||
|
||||
xrender_put_image( src_pixmap, src_pict, mask_pict, NULL, physdev->pict_format,
|
||||
NULL, tmp_pixmap, src, &tmp, use_repeat );
|
||||
|
@ -2335,7 +2319,6 @@ static BOOL xrenderdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG n
|
|||
|
||||
dst_pict = get_xrender_picture( physdev, 0, NULL );
|
||||
|
||||
wine_tsx11_lock();
|
||||
src_pict = pXRenderCreateLinearGradient( gdi_display, &gradient, stops, colors, 2 );
|
||||
xrender_blit( PictOpSrc, src_pict, 0, dst_pict,
|
||||
0, 0, rc.right - rc.left, rc.bottom - rc.top,
|
||||
|
@ -2343,7 +2326,6 @@ static BOOL xrenderdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG n
|
|||
physdev->x11dev->dc_rect.top + rc.top,
|
||||
rc.right - rc.left, rc.bottom - rc.top, 1, 1 );
|
||||
pXRenderFreePicture( gdi_display, src_pict );
|
||||
wine_tsx11_unlock();
|
||||
add_device_bounds( physdev->x11dev, &rc );
|
||||
}
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue