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 width = visRectDst->right - visRectDst->left;
|
||||||
INT height = visRectDst->bottom - visRectDst->top;
|
INT height = visRectDst->bottom - visRectDst->top;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
|
|
||||||
if (!X11DRV_PALETTE_XPixelToPalette || (physDev->depth == 1) ||
|
if (!X11DRV_PALETTE_XPixelToPalette || (physDev->depth == 1) ||
|
||||||
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
(X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) )
|
||||||
{
|
{
|
||||||
|
@ -633,8 +631,6 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, cons
|
||||||
XDestroyImage( image );
|
XDestroyImage( image );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return exposures;
|
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 );
|
if (use_dst) BITBLT_GetDstArea( physdev, pixmaps[DST], gc, visrect );
|
||||||
null_brush = use_pat && !X11DRV_SetupGCForPatBlt( physdev, gc, TRUE );
|
null_brush = use_pat && !X11DRV_SetupGCForPatBlt( physdev, gc, TRUE );
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
for ( ; *opcode; opcode++)
|
for ( ; *opcode; opcode++)
|
||||||
{
|
{
|
||||||
if (OP_DST(*opcode) == DST) result = pixmaps[DST];
|
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 );
|
physdev->exposures += BITBLT_PutDstArea( physdev, result, visrect );
|
||||||
XFreePixmap( gdi_display, pixmaps[DST] );
|
XFreePixmap( gdi_display, pixmaps[DST] );
|
||||||
if (pixmaps[TMP]) XFreePixmap( gdi_display, pixmaps[TMP] );
|
if (pixmaps[TMP]) XFreePixmap( gdi_display, pixmaps[TMP] );
|
||||||
wine_tsx11_unlock();
|
|
||||||
add_device_bounds( physdev, visrect );
|
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;
|
if (usePat && !X11DRV_SetupGCForBrush( physDev )) return TRUE;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
XSetFunction( gdi_display, physDev->gc, OP_ROP(*opcode) );
|
XSetFunction( gdi_display, physDev->gc, OP_ROP(*opcode) );
|
||||||
|
|
||||||
switch(rop) /* a few special cases */
|
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,
|
physDev->dc_rect.top + dst->visrect.top,
|
||||||
dst->visrect.right - dst->visrect.left,
|
dst->visrect.right - dst->visrect.left,
|
||||||
dst->visrect.bottom - dst->visrect.top );
|
dst->visrect.bottom - dst->visrect.top );
|
||||||
wine_tsx11_unlock();
|
|
||||||
add_device_bounds( physDev, &dst->visrect );
|
add_device_bounds( physDev, &dst->visrect );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -828,7 +820,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
||||||
{
|
{
|
||||||
if (same_format(physDevSrc, physDevDst))
|
if (same_format(physDevSrc, physDevDst))
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
|
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
|
||||||
XCopyArea( gdi_display, physDevSrc->drawable,
|
XCopyArea( gdi_display, physDevSrc->drawable,
|
||||||
physDevDst->drawable, physDevDst->gc,
|
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.left + dst->visrect.left,
|
||||||
physDevDst->dc_rect.top + dst->visrect.top );
|
physDevDst->dc_rect.top + dst->visrect.top );
|
||||||
physDevDst->exposures++;
|
physDevDst->exposures++;
|
||||||
wine_tsx11_unlock();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (physDevSrc->depth == 1)
|
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 text_pixel = X11DRV_PALETTE_ToPhysical( physDevDst, GetTextColor(physDevDst->dev.hdc) );
|
||||||
int bkgnd_pixel = X11DRV_PALETTE_ToPhysical( physDevDst, GetBkColor(physDevDst->dev.hdc) );
|
int bkgnd_pixel = X11DRV_PALETTE_ToPhysical( physDevDst, GetBkColor(physDevDst->dev.hdc) );
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
XSetBackground( gdi_display, physDevDst->gc, text_pixel );
|
XSetBackground( gdi_display, physDevDst->gc, text_pixel );
|
||||||
XSetForeground( gdi_display, physDevDst->gc, bkgnd_pixel );
|
XSetForeground( gdi_display, physDevDst->gc, bkgnd_pixel );
|
||||||
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
|
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.left + dst->visrect.left,
|
||||||
physDevDst->dc_rect.top + dst->visrect.top, 1 );
|
physDevDst->dc_rect.top + dst->visrect.top, 1 );
|
||||||
physDevDst->exposures++;
|
physDevDst->exposures++;
|
||||||
wine_tsx11_unlock();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
gc = XCreateGC( gdi_display, physDevDst->drawable, 0, NULL );
|
gc = XCreateGC( gdi_display, physDevDst->drawable, 0, NULL );
|
||||||
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
||||||
XSetGraphicsExposures( gdi_display, gc, False );
|
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,
|
physDevSrc->dc_rect.top + src->visrect.top,
|
||||||
width, height, 0, 0 );
|
width, height, 0, 0 );
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
execute_rop( physDevDst, src_pixmap, gc, &dst->visrect, rop );
|
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 );
|
pixmap = create_pixmap_from_image( physdev->dev.hdc, &vis, info, &pattern->bits, pattern->usage );
|
||||||
if (!pixmap) return FALSE;
|
if (!pixmap) return FALSE;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
if (physdev->brush.pixmap) XFreePixmap( gdi_display, physdev->brush.pixmap );
|
if (physdev->brush.pixmap) XFreePixmap( gdi_display, physdev->brush.pixmap );
|
||||||
physdev->brush.pixmap = 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.fillStyle = FillTiled;
|
||||||
physdev->brush.pixel = 0; /* Ignored */
|
physdev->brush.pixel = 0; /* Ignored */
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -364,7 +364,6 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
||||||
{
|
{
|
||||||
register int x, y;
|
register int x, y;
|
||||||
XImage *image;
|
XImage *image;
|
||||||
wine_tsx11_lock();
|
|
||||||
pixmap = XCreatePixmap( gdi_display, root_window, 8, 8, physDev->depth );
|
pixmap = XCreatePixmap( gdi_display, root_window, 8, 8, physDev->depth );
|
||||||
image = XGetImage( gdi_display, physDev->brush.pixmap, 0, 0, 8, 8,
|
image = XGetImage( gdi_display, physDev->brush.pixmap, 0, 0, 8, 8,
|
||||||
AllPlanes, ZPixmap );
|
AllPlanes, ZPixmap );
|
||||||
|
@ -374,7 +373,6 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
|
||||||
X11DRV_PALETTE_XPixelToPalette[XGetPixel( image, x, y)] );
|
X11DRV_PALETTE_XPixelToPalette[XGetPixel( image, x, y)] );
|
||||||
XPutImage( gdi_display, pixmap, gc, image, 0, 0, 0, 0, 8, 8 );
|
XPutImage( gdi_display, pixmap, gc, image, 0, 0, 0, 0, 8, 8 );
|
||||||
XDestroyImage( image );
|
XDestroyImage( image );
|
||||||
wine_tsx11_unlock();
|
|
||||||
val.tile = pixmap;
|
val.tile = pixmap;
|
||||||
}
|
}
|
||||||
else val.tile = physDev->brush.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 ))
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
physDev->dc_rect.left + rc.left, physDev->dc_rect.top + rc.top,
|
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 );
|
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,
|
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
points, lines+1, CoordModeOrigin );
|
points, lines+1, CoordModeOrigin );
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
physDev->pen.width = oldwidth;
|
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 ))
|
if (X11DRV_SetupGCForBrush( physDev ))
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
if (ell_width > (rc.right-rc.left) )
|
if (ell_width > (rc.right-rc.left) )
|
||||||
if (ell_height > (rc.bottom-rc.top) )
|
if (ell_height > (rc.bottom-rc.top) )
|
||||||
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
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.right - rc.left - 2,
|
||||||
rc.bottom - rc.top - ell_height - 1);
|
rc.bottom - rc.top - ell_height - 1);
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
/* FIXME: this could be done with on X call
|
/* FIXME: this could be done with on X call
|
||||||
* more efficient and probably more correct
|
* 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 ))
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
if (ell_width > (rc.right-rc.left) )
|
if (ell_width > (rc.right-rc.left) )
|
||||||
if (ell_height > (rc.bottom-rc.top) )
|
if (ell_height > (rc.bottom-rc.top) )
|
||||||
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
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.left + rc.left,
|
||||||
physDev->dc_rect.top + rc.bottom - (ell_height+1) / 2);
|
physDev->dc_rect.top + rc.bottom - (ell_height+1) / 2);
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
physDev->pen.width = oldwidth;
|
physDev->pen.width = oldwidth;
|
||||||
|
@ -1509,7 +1501,6 @@ static unsigned char *get_icm_profile( unsigned long *size )
|
||||||
unsigned long count, remaining;
|
unsigned long count, remaining;
|
||||||
unsigned char *profile, *ret = NULL;
|
unsigned char *profile, *ret = NULL;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
XGetWindowProperty( gdi_display, DefaultRootWindow(gdi_display),
|
XGetWindowProperty( gdi_display, DefaultRootWindow(gdi_display),
|
||||||
x11drv_atom(_ICC_PROFILE), 0, ~0UL, False, AnyPropertyType,
|
x11drv_atom(_ICC_PROFILE), 0, ~0UL, False, AnyPropertyType,
|
||||||
&type, &format, &count, &remaining, &profile );
|
&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 );
|
if ((ret = HeapAlloc( GetProcessHeap(), 0, *size ))) memcpy( ret, profile, *size );
|
||||||
XFree( profile );
|
XFree( profile );
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -966,7 +966,6 @@ static Cursor create_xlib_monochrome_cursor( HDC hdc, const ICONINFOEXW *icon, i
|
||||||
bits.is_copy = TRUE;
|
bits.is_copy = TRUE;
|
||||||
if (!(src_pixmap = create_pixmap_from_image( hdc, &vis, info, &bits, DIB_RGB_COLORS ))) goto done;
|
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 );
|
bits_pixmap = XCreatePixmap( gdi_display, root_window, width, height, 1 );
|
||||||
mask_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 );
|
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, src_pixmap );
|
||||||
XFreePixmap( gdi_display, bits_pixmap );
|
XFreePixmap( gdi_display, bits_pixmap );
|
||||||
XFreePixmap( gdi_display, mask_pixmap );
|
XFreePixmap( gdi_display, mask_pixmap );
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
HeapFree( GetProcessHeap(), 0, mask_bits );
|
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;
|
bits.ptr = mask_bits;
|
||||||
mask_pixmap = create_pixmap_from_image( hdc, &vis, info, &bits, DIB_RGB_COLORS );
|
mask_pixmap = create_pixmap_from_image( hdc, &vis, info, &bits, DIB_RGB_COLORS );
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
if (mask_pixmap)
|
if (mask_pixmap)
|
||||||
{
|
{
|
||||||
cursor = XCreatePixmapCursor( gdi_display, xor_pixmap, 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, mask_pixmap );
|
||||||
}
|
}
|
||||||
XFreePixmap( gdi_display, xor_pixmap );
|
XFreePixmap( gdi_display, xor_pixmap );
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
HeapFree( GetProcessHeap(), 0, color_bits );
|
HeapFree( GetProcessHeap(), 0, color_bits );
|
||||||
|
|
|
@ -335,7 +335,6 @@ static int GLXErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL infoInitialized = FALSE;
|
|
||||||
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
||||||
{
|
{
|
||||||
int screen = DefaultScreen(gdi_display);
|
int screen = DefaultScreen(gdi_display);
|
||||||
|
@ -348,16 +347,10 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
int attribList[] = {GLX_RGBA, GLX_DOUBLEBUFFER, None};
|
int attribList[] = {GLX_RGBA, GLX_DOUBLEBUFFER, None};
|
||||||
|
|
||||||
if (infoInitialized)
|
|
||||||
return TRUE;
|
|
||||||
infoInitialized = TRUE;
|
|
||||||
|
|
||||||
attr.override_redirect = True;
|
attr.override_redirect = True;
|
||||||
attr.colormap = None;
|
attr.colormap = None;
|
||||||
attr.border_pixel = 0;
|
attr.border_pixel = 0;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
|
|
||||||
vis = pglXChooseVisual(gdi_display, screen, attribList);
|
vis = pglXChooseVisual(gdi_display, screen, attribList);
|
||||||
if (vis) {
|
if (vis) {
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
@ -460,7 +453,6 @@ done:
|
||||||
}
|
}
|
||||||
if (win != root) XDestroyWindow( gdi_display, win );
|
if (win != root) XDestroyWindow( gdi_display, win );
|
||||||
if (attr.colormap) XFreeColormap( gdi_display, attr.colormap );
|
if (attr.colormap) XFreeColormap( gdi_display, attr.colormap );
|
||||||
wine_tsx11_unlock();
|
|
||||||
if (!ret) ERR(" couldn't initialize OpenGL, expect problems\n");
|
if (!ret) ERR(" couldn't initialize OpenGL, expect problems\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -560,11 +552,9 @@ static BOOL has_opengl(void)
|
||||||
|
|
||||||
if(!X11DRV_WineGL_InitOpenglInfo()) goto failed;
|
if(!X11DRV_WineGL_InitOpenglInfo()) goto failed;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
if (pglXQueryExtension(gdi_display, &error_base, &event_base)) {
|
if (pglXQueryExtension(gdi_display, &error_base, &event_base)) {
|
||||||
TRACE("GLX is up and running error_base = %d\n", error_base);
|
TRACE("GLX is up and running error_base = %d\n", error_base);
|
||||||
} else {
|
} else {
|
||||||
wine_tsx11_unlock();
|
|
||||||
ERR( "GLX extension is missing, disabling OpenGL.\n" );
|
ERR( "GLX extension is missing, disabling OpenGL.\n" );
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
@ -629,8 +619,6 @@ static BOOL has_opengl(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
X11DRV_WineGL_LoadExtensions();
|
X11DRV_WineGL_LoadExtensions();
|
||||||
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
@ -1201,8 +1189,6 @@ static int glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
|
||||||
ppfd->dwFlags = PFD_SUPPORT_OPENGL;
|
ppfd->dwFlags = PFD_SUPPORT_OPENGL;
|
||||||
/* Now the flags extracted from the Visual */
|
/* Now the flags extracted from the Visual */
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
|
|
||||||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
|
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
|
||||||
if(value & GLX_WINDOW_BIT)
|
if(value & GLX_WINDOW_BIT)
|
||||||
ppfd->dwFlags |= PFD_DRAW_TO_WINDOW;
|
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);
|
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_STENCIL_SIZE, &value);
|
||||||
ppfd->cStencilBits = value;
|
ppfd->cStencilBits = value;
|
||||||
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
ppfd->iLayerType = PFD_MAIN_PLANE;
|
ppfd->iLayerType = PFD_MAIN_PLANE;
|
||||||
|
|
||||||
if (TRACE_ON(wgl)) {
|
if (TRACE_ON(wgl)) {
|
||||||
|
@ -1388,7 +1372,6 @@ static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORM
|
||||||
if (TRACE_ON(wgl)) {
|
if (TRACE_ON(wgl)) {
|
||||||
int gl_test = 0;
|
int gl_test = 0;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
gl_test = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_FBCONFIG_ID, &value);
|
gl_test = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_FBCONFIG_ID, &value);
|
||||||
if (gl_test) {
|
if (gl_test) {
|
||||||
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
|
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);
|
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
|
||||||
TRACE(" - DRAWABLE_TYPE 0x%x\n", value);
|
TRACE(" - DRAWABLE_TYPE 0x%x\n", value);
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
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);
|
WARN("Unable to convert iPixelFormat %d to a GLX one!\n", iPixelFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
for (i = 0; i < nAttributes; ++i) {
|
for (i = 0; i < nAttributes; ++i) {
|
||||||
const int curWGLAttr = piAttributes[i];
|
const int curWGLAttr = piAttributes[i];
|
||||||
TRACE("pAttr[%d] = %x\n", i, curWGLAttr);
|
TRACE("pAttr[%d] = %x\n", i, curWGLAttr);
|
||||||
|
@ -2506,16 +2487,13 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
|
||||||
piValues[i] = GL_FALSE;
|
piValues[i] = GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
|
||||||
get_error:
|
get_error:
|
||||||
wine_tsx11_unlock();
|
|
||||||
ERR("(%p): unexpected failure on GetFBConfigAttrib(%x) returns FALSE\n", hdc, curGLXAttr);
|
ERR("(%p): unexpected failure on GetFBConfigAttrib(%x) returns FALSE\n", hdc, curGLXAttr);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
pix_error:
|
pix_error:
|
||||||
wine_tsx11_unlock();
|
|
||||||
ERR("(%p): unexpected iPixelFormat(%d) vs nFormats(%d), returns FALSE\n", hdc, iPixelFormat, nWGLFormats);
|
ERR("(%p): unexpected iPixelFormat(%d) vs nFormats(%d), returns FALSE\n", hdc, iPixelFormat, nWGLFormats);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -2578,7 +2556,6 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
|
||||||
Drawable prev_drawable;
|
Drawable prev_drawable;
|
||||||
GLXContext tmp_context;
|
GLXContext tmp_context;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
prev_context = pglXGetCurrentContext();
|
prev_context = pglXGetCurrentContext();
|
||||||
prev_drawable = pglXGetCurrentDrawable();
|
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 */
|
/* Switch back to the original drawable and upload the pbuffer-texture */
|
||||||
pglXMakeCurrent(gdi_display, prev_drawable, prev_context);
|
pglXMakeCurrent(gdi_display, prev_drawable, prev_context);
|
||||||
pglXDestroyContext(gdi_display, tmp_context);
|
pglXDestroyContext(gdi_display, tmp_context);
|
||||||
wine_tsx11_unlock();
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,6 @@ int X11DRV_PALETTE_Init(void)
|
||||||
X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_VIRTUAL;
|
X11DRV_PALETTE_PaletteFlags |= X11DRV_PALETTE_VIRTUAL;
|
||||||
case GrayScale:
|
case GrayScale:
|
||||||
case PseudoColor:
|
case PseudoColor:
|
||||||
wine_tsx11_lock();
|
|
||||||
if (private_color_map)
|
if (private_color_map)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes win_attr;
|
XSetWindowAttributes win_attr;
|
||||||
|
@ -182,7 +181,6 @@ int X11DRV_PALETTE_Init(void)
|
||||||
X11DRV_PALETTE_PaletteXColormap = XCreateColormap(gdi_display, root_window,
|
X11DRV_PALETTE_PaletteXColormap = XCreateColormap(gdi_display, root_window,
|
||||||
visual, AllocNone);
|
visual, AllocNone);
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case StaticGray:
|
case StaticGray:
|
||||||
|
@ -199,7 +197,6 @@ int X11DRV_PALETTE_Init(void)
|
||||||
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
|
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
|
||||||
* depths 1 and 4
|
* depths 1 and 4
|
||||||
*/
|
*/
|
||||||
wine_tsx11_lock();
|
|
||||||
depths = XListDepths(gdi_display,DefaultScreen(gdi_display),&nrofdepths);
|
depths = XListDepths(gdi_display,DefaultScreen(gdi_display),&nrofdepths);
|
||||||
if ((nrofdepths==2) && ((depths[0]==4) || depths[1]==4)) {
|
if ((nrofdepths==2) && ((depths[0]==4) || depths[1]==4)) {
|
||||||
monoPlane = 1;
|
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);
|
X11DRV_PALETTE_ComputeColorShifts(&X11DRV_PALETTE_default_shifts, visual->red_mask, visual->green_mask, visual->blue_mask);
|
||||||
}
|
}
|
||||||
XFree(depths);
|
XFree(depths);
|
||||||
wine_tsx11_unlock();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,7 +343,6 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
||||||
|
|
||||||
/* Allocate system palette colors */
|
/* Allocate system palette colors */
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
for( i=0; i < palette_size; i++ )
|
for( i=0; i < palette_size; i++ )
|
||||||
{
|
{
|
||||||
if( i < NB_RESERVED_COLORS/2 )
|
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 )
|
else if (i >= palette_size - 8 )
|
||||||
X11DRV_PALETTE_mapEGAPixel[i - (palette_size - 16)] = color.pixel;
|
X11DRV_PALETTE_mapEGAPixel[i - (palette_size - 16)] = color.pixel;
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
X11DRV_PALETTE_XPixelToPalette = X11DRV_PALETTE_PaletteToXPixel = NULL;
|
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;
|
if (copy_default_colors > 256) copy_default_colors = 256;
|
||||||
for (i = 0; i < copy_default_colors; i++)
|
for (i = 0; i < copy_default_colors; i++)
|
||||||
defaultColors[i].pixel = (long) i;
|
defaultColors[i].pixel = (long) i;
|
||||||
wine_tsx11_lock();
|
|
||||||
XQueryColors(gdi_display, defaultCM, &defaultColors[0], copy_default_colors);
|
XQueryColors(gdi_display, defaultCM, &defaultColors[0], copy_default_colors);
|
||||||
for (i = 0; i < copy_default_colors; i++)
|
for (i = 0; i < copy_default_colors; i++)
|
||||||
XAllocColor( gdi_display, X11DRV_PALETTE_PaletteXColormap, &defaultColors[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 )
|
else if (i >= NB_RESERVED_COLORS - 8 )
|
||||||
X11DRV_PALETTE_mapEGAPixel[i - (NB_RESERVED_COLORS-16)] = color.pixel;
|
X11DRV_PALETTE_mapEGAPixel[i - (NB_RESERVED_COLORS-16)] = color.pixel;
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
/* now allocate changeable set */
|
/* now allocate changeable set */
|
||||||
|
|
||||||
|
@ -509,7 +501,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
/* comment this out if you want to debug palette init */
|
/* comment this out if you want to debug palette init */
|
||||||
XGrabServer(gdi_display);
|
XGrabServer(gdi_display);
|
||||||
|
|
||||||
|
@ -543,7 +534,6 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
||||||
palette_size = c_min + NB_RESERVED_COLORS;
|
palette_size = c_min + NB_RESERVED_COLORS;
|
||||||
|
|
||||||
XUngrabServer(gdi_display);
|
XUngrabServer(gdi_display);
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
TRACE("adjusted size %i colorcells\n", palette_size);
|
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_g = (255 - NB_COLORCUBE_START_INDEX)/no_g;
|
||||||
inc_b = (255 - NB_COLORCUBE_START_INDEX)/no_b;
|
inc_b = (255 - NB_COLORCUBE_START_INDEX)/no_b;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
|
|
||||||
idx = X11DRV_PALETTE_firstFree;
|
idx = X11DRV_PALETTE_firstFree;
|
||||||
|
|
||||||
if( idx != -1 )
|
if( idx != -1 )
|
||||||
|
@ -737,7 +725,6 @@ static void X11DRV_PALETTE_FillDefaultColors( const PALETTEENTRY *sys_pal_templa
|
||||||
}
|
}
|
||||||
COLOR_gapFilled = idx - COLOR_gapStart;
|
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]))
|
if(is_wxrformat_compatible_with_default_visual(&wxr_formats_template[i]))
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
pict_formats[i] = pXRenderFindVisualFormat(gdi_display, visual);
|
pict_formats[i] = pXRenderFindVisualFormat(gdi_display, visual);
|
||||||
if (!pict_formats[i])
|
if (!pict_formats[i])
|
||||||
{
|
{
|
||||||
|
@ -331,7 +330,6 @@ static int load_xrender_formats(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
if (pict_formats[i]) default_format = i;
|
if (pict_formats[i]) default_format = i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -603,7 +601,6 @@ static void free_xrender_picture( struct xrender_physdev *dev )
|
||||||
{
|
{
|
||||||
if (dev->pict || dev->pict_src)
|
if (dev->pict || dev->pict_src)
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
|
||||||
XFlush( gdi_display );
|
XFlush( gdi_display );
|
||||||
if (dev->pict)
|
if (dev->pict)
|
||||||
{
|
{
|
||||||
|
@ -617,7 +614,6 @@ static void free_xrender_picture( struct xrender_physdev *dev )
|
||||||
pXRenderFreePicture(gdi_display, dev->pict_src);
|
pXRenderFreePicture(gdi_display, dev->pict_src);
|
||||||
dev->pict_src = 0;
|
dev->pict_src = 0;
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,7 +623,7 @@ static Picture get_no_alpha_mask(void)
|
||||||
static Pixmap pixmap;
|
static Pixmap pixmap;
|
||||||
static Picture pict;
|
static Picture pict;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
EnterCriticalSection( &xrender_cs );
|
||||||
if (!pict)
|
if (!pict)
|
||||||
{
|
{
|
||||||
XRenderPictureAttributes pa;
|
XRenderPictureAttributes pa;
|
||||||
|
@ -642,7 +638,7 @@ static Picture get_no_alpha_mask(void)
|
||||||
col.alpha = 0;
|
col.alpha = 0;
|
||||||
pXRenderFillRectangle( gdi_display, PictOpSrc, pict, &col, 0, 0, 1, 1 );
|
pXRenderFillRectangle( gdi_display, PictOpSrc, pict, &col, 0, 0, 1, 1 );
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
LeaveCriticalSection( &xrender_cs );
|
||||||
return pict;
|
return pict;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -983,7 +979,6 @@ static int GetCacheEntry( HDC hdc, LFANDSIZE *plfsz )
|
||||||
char *value;
|
char *value;
|
||||||
BOOL antialias = TRUE;
|
BOOL antialias = TRUE;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
if ((value = XGetDefault( gdi_display, "Xft", "antialias" )))
|
if ((value = XGetDefault( gdi_display, "Xft", "antialias" )))
|
||||||
{
|
{
|
||||||
if (tolower(value[0]) == 'f' || tolower(value[0]) == 'n' ||
|
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, "vbgr" )) entry->aa_default = AA_VBGR;
|
||||||
else if (!strcmp( value, "none" )) entry->aa_default = AA_Grey;
|
else if (!strcmp( value, "none" )) entry->aa_default = AA_Grey;
|
||||||
}
|
}
|
||||||
wine_tsx11_unlock();
|
|
||||||
if (!antialias) font_smoothing = FALSE;
|
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 */
|
/* Make sure we don't have any transforms set from a previous call */
|
||||||
set_xrender_transformation(pict, 1, 1, 0, 0);
|
set_xrender_transformation(pict, 1, 1, 0, 0);
|
||||||
pXRenderCompositeText16(gdi_display, render_op,
|
pXRenderCompositeText16(gdi_display, render_op,
|
||||||
|
@ -1652,7 +1645,6 @@ static BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
||||||
pict,
|
pict,
|
||||||
formatEntry->font_format,
|
formatEntry->font_format,
|
||||||
0, 0, 0, 0, elts, count);
|
0, 0, 0, 0, elts, count);
|
||||||
wine_tsx11_unlock();
|
|
||||||
HeapFree(GetProcessHeap(), 0, elts);
|
HeapFree(GetProcessHeap(), 0, elts);
|
||||||
|
|
||||||
LeaveCriticalSection(&xrender_cs);
|
LeaveCriticalSection(&xrender_cs);
|
||||||
|
@ -1669,7 +1661,6 @@ static void multiply_alpha( Picture pict, XRenderPictFormat *format, int alpha,
|
||||||
Picture src_pict, mask_pict;
|
Picture src_pict, mask_pict;
|
||||||
XRenderColor color;
|
XRenderColor color;
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
src_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
src_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
||||||
mask_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
mask_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, format->depth );
|
||||||
pa.repeat = RepeatNormal;
|
pa.repeat = RepeatNormal;
|
||||||
|
@ -1686,7 +1677,6 @@ static void multiply_alpha( Picture pict, XRenderPictFormat *format, int alpha,
|
||||||
pXRenderFreePicture( gdi_display, mask_pict );
|
pXRenderFreePicture( gdi_display, mask_pict );
|
||||||
XFreePixmap( gdi_display, src_pixmap );
|
XFreePixmap( gdi_display, src_pixmap );
|
||||||
XFreePixmap( gdi_display, mask_pixmap );
|
XFreePixmap( gdi_display, mask_pixmap );
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper function for (stretched) blitting using xrender */
|
/* 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.
|
/* 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.
|
* 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. */
|
* 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)
|
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
|
/* 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,
|
pXRenderComposite( gdi_display, op, src_pict, mask_pict, dst_pict,
|
||||||
x_offset, y_offset, 0, 0, x_dst, y_dst, width_dst, height_dst );
|
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 */
|
/* 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 */
|
color.alpha = 0xffff; /* tile pict needs 100% alpha */
|
||||||
tile_pict = get_tile_pict( dst_format, &color );
|
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 );
|
pXRenderFillRectangle( gdi_display, PictOpSrc, dst_pict, fg, x_dst, y_dst, width_dst, height_dst );
|
||||||
|
|
||||||
if (xscale != 1.0 || yscale != 1.0)
|
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,
|
pXRenderComposite(gdi_display, PictOpOver, tile_pict, src_pict, dst_pict,
|
||||||
0, 0, x_offset, y_offset, x_dst, y_dst, width_dst, height_dst );
|
0, 0, x_offset, y_offset, x_dst, y_dst, width_dst, height_dst );
|
||||||
wine_tsx11_unlock();
|
|
||||||
LeaveCriticalSection( &xrender_cs );
|
LeaveCriticalSection( &xrender_cs );
|
||||||
|
|
||||||
/* force the alpha channel for background pixels, it has been set to 100% by the tile */
|
/* 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;
|
tmp.y -= tmp.visrect.top;
|
||||||
OffsetRect( &tmp.visrect, -tmp.visrect.left, -tmp.visrect.top );
|
OffsetRect( &tmp.visrect, -tmp.visrect.left, -tmp.visrect.top );
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
gc = XCreateGC( gdi_display, physdev->x11dev->drawable, 0, NULL );
|
gc = XCreateGC( gdi_display, physdev->x11dev->drawable, 0, NULL );
|
||||||
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
XSetSubwindowMode( gdi_display, gc, IncludeInferiors );
|
||||||
XSetGraphicsExposures( gdi_display, gc, False );
|
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.right - tmp.visrect.left,
|
||||||
tmp.visrect.bottom - tmp.visrect.top,
|
tmp.visrect.bottom - tmp.visrect.top,
|
||||||
physdev->pict_format->depth );
|
physdev->pict_format->depth );
|
||||||
wine_tsx11_unlock();
|
|
||||||
|
|
||||||
xrender_put_image( src_pixmap, src_pict, mask_pict, NULL, physdev->pict_format,
|
xrender_put_image( src_pixmap, src_pict, mask_pict, NULL, physdev->pict_format,
|
||||||
NULL, tmp_pixmap, src, &tmp, use_repeat );
|
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 );
|
dst_pict = get_xrender_picture( physdev, 0, NULL );
|
||||||
|
|
||||||
wine_tsx11_lock();
|
|
||||||
src_pict = pXRenderCreateLinearGradient( gdi_display, &gradient, stops, colors, 2 );
|
src_pict = pXRenderCreateLinearGradient( gdi_display, &gradient, stops, colors, 2 );
|
||||||
xrender_blit( PictOpSrc, src_pict, 0, dst_pict,
|
xrender_blit( PictOpSrc, src_pict, 0, dst_pict,
|
||||||
0, 0, rc.right - rc.left, rc.bottom - rc.top,
|
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,
|
physdev->x11dev->dc_rect.top + rc.top,
|
||||||
rc.right - rc.left, rc.bottom - rc.top, 1, 1 );
|
rc.right - rc.left, rc.bottom - rc.top, 1, 1 );
|
||||||
pXRenderFreePicture( gdi_display, src_pict );
|
pXRenderFreePicture( gdi_display, src_pict );
|
||||||
wine_tsx11_unlock();
|
|
||||||
add_device_bounds( physdev->x11dev, &rc );
|
add_device_bounds( physdev->x11dev, &rc );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue