winex11: Disable the XRender StretchBlt implementation if XRender wasn't loaded.

This commit is contained in:
Alexandre Julliard 2011-09-16 11:36:59 +02:00
parent a09753a349
commit c2edf4399c
1 changed files with 7 additions and 3 deletions

View File

@ -2435,13 +2435,14 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
return dst_dev->funcs->pStretchBlt( dst_dev, dst, src_dev, src, rop ); return dst_dev->funcs->pStretchBlt( dst_dev, dst, src_dev, src, rop );
} }
if (!X11DRV_XRender_Installed) goto x11drv_fallback;
/* XRender is of no use for color -> mono */ /* XRender is of no use for color -> mono */
if (physdev_dst->format == WXR_FORMAT_MONO && physdev_src->format != WXR_FORMAT_MONO) if (physdev_dst->format == WXR_FORMAT_MONO && physdev_src->format != WXR_FORMAT_MONO)
return X11DRV_StretchBlt( &physdev_dst->x11dev->dev, dst, &physdev_src->x11dev->dev, src, rop ); goto x11drv_fallback;
/* if not stretching, we only need to handle format conversion */ /* if not stretching, we only need to handle format conversion */
if (!stretch && physdev_dst->format == physdev_src->format) if (!stretch && physdev_dst->format == physdev_src->format) goto x11drv_fallback;
return X11DRV_StretchBlt( &physdev_dst->x11dev->dev, dst, &physdev_src->x11dev->dev, src, rop );
sSrc = sDst = X11DRV_LockDIBSection( physdev_dst->x11dev, DIB_Status_None ); sSrc = sDst = X11DRV_LockDIBSection( physdev_dst->x11dev, DIB_Status_None );
if (physdev_dst != physdev_src) sSrc = X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_None ); if (physdev_dst != physdev_src) sSrc = X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_None );
@ -2484,6 +2485,9 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (physdev_dst != physdev_src) X11DRV_UnlockDIBSection( physdev_src->x11dev, FALSE ); if (physdev_dst != physdev_src) X11DRV_UnlockDIBSection( physdev_src->x11dev, FALSE );
X11DRV_UnlockDIBSection( physdev_dst->x11dev, TRUE ); X11DRV_UnlockDIBSection( physdev_dst->x11dev, TRUE );
return TRUE; return TRUE;
x11drv_fallback:
return X11DRV_StretchBlt( &physdev_dst->x11dev->dev, dst, &physdev_src->x11dev->dev, src, rop );
} }