Commit 6e80c49f authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Get rid of the client-side DIB optimization in StretchBlt.

parent 4cf842e7
......@@ -1315,7 +1315,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
X11DRV_PDEVICE *physDevSrc = get_x11drv_dev( src_dev );
BOOL fStretch;
INT width, height;
INT sDst, sSrc = DIB_Status_None;
const BYTE *opcode;
Pixmap src_pixmap;
GC tmpGC;
......@@ -1328,25 +1327,11 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
fStretch = (src->width != dst->width) || (src->height != dst->height);
if (physDevDst != physDevSrc)
sSrc = X11DRV_LockDIBSection( physDevSrc, DIB_Status_None );
width = dst->visrect.right - dst->visrect.left;
height = dst->visrect.bottom - dst->visrect.top;
sDst = X11DRV_LockDIBSection( physDevDst, DIB_Status_None );
if (physDevDst == physDevSrc) sSrc = sDst;
/* try client-side DIB copy */
if (!fStretch && sSrc == DIB_Status_AppMod)
{
if (physDevDst != physDevSrc) X11DRV_UnlockDIBSection( physDevSrc, FALSE );
X11DRV_UnlockDIBSection( physDevDst, TRUE );
dst_dev = GET_NEXT_PHYSDEV( dst_dev, pStretchBlt );
return dst_dev->funcs->pStretchBlt( dst_dev, dst, src_dev, src, rop );
}
X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod );
X11DRV_LockDIBSection( physDevDst, DIB_Status_GdiMod );
if (physDevDst != physDevSrc) X11DRV_LockDIBSection( physDevSrc, DIB_Status_GdiMod );
opcode = BITBLT_Opcodes[(rop >> 16) & 0xff];
......@@ -1359,7 +1344,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) );
wine_tsx11_unlock();
if (physDevSrc != physDevDst) X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod );
wine_tsx11_lock();
XCopyArea( gdi_display, physDevSrc->drawable,
physDevDst->drawable, physDevDst->gc,
......@@ -1376,7 +1360,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
{
int fg, bg;
X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod );
get_colors(physDevDst, physDevSrc, &fg, &bg);
wine_tsx11_lock();
XSetBackground( gdi_display, physDevDst->gc, fg );
......@@ -1402,8 +1385,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
src_pixmap = XCreatePixmap( gdi_display, root_window, width, height, physDevDst->depth );
wine_tsx11_unlock();
if (physDevDst != physDevSrc) X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod );
if (fStretch)
BITBLT_GetSrcAreaStretch( physDevSrc, physDevDst, src_pixmap, tmpGC, src, dst );
else
......
......@@ -2609,7 +2609,6 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
{
struct xrender_physdev *physdev_dst = get_xrender_dev( dst_dev );
struct xrender_physdev *physdev_src = get_xrender_dev( src_dev );
INT sSrc, sDst;
BOOL stretch = (src->width != dst->width) || (src->height != dst->height);
if (src_dev->funcs != dst_dev->funcs)
......@@ -2627,20 +2626,8 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
/* if not stretching, we only need to handle format conversion */
if (!stretch && physdev_dst->format == physdev_src->format) goto x11drv_fallback;
sSrc = sDst = X11DRV_LockDIBSection( physdev_dst->x11dev, DIB_Status_None );
if (physdev_dst != physdev_src) sSrc = X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_None );
/* try client-side DIB copy */
if (!stretch && sSrc == DIB_Status_AppMod)
{
if (physdev_dst != physdev_src) X11DRV_UnlockDIBSection( physdev_src->x11dev, FALSE );
X11DRV_UnlockDIBSection( physdev_dst->x11dev, TRUE );
dst_dev = GET_NEXT_PHYSDEV( dst_dev, pStretchBlt );
return dst_dev->funcs->pStretchBlt( dst_dev, dst, src_dev, src, rop );
}
X11DRV_CoerceDIBSection( physdev_dst->x11dev, DIB_Status_GdiMod );
if (physdev_dst != physdev_src) X11DRV_CoerceDIBSection( physdev_src->x11dev, DIB_Status_GdiMod );
X11DRV_LockDIBSection( physdev_dst->x11dev, DIB_Status_GdiMod );
if (physdev_dst != physdev_src) X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_GdiMod );
if (rop != SRCCOPY)
{
......
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