Alexandre Julliard : winex11: Get rid of the client-side DIB optimization in StretchBlt.
Alexandre Julliard
julliard at winehq.org
Wed Sep 28 14:45:46 CDT 2011
Module: wine
Branch: master
Commit: 6e80c49fc916acd6a534de990dc97968839dc7f0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6e80c49fc916acd6a534de990dc97968839dc7f0
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Sep 28 11:12:14 2011 +0200
winex11: Get rid of the client-side DIB optimization in StretchBlt.
---
dlls/winex11.drv/bitblt.c | 23 ++---------------------
dlls/winex11.drv/xrender.c | 17 ++---------------
2 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 4c7246e..34d4c05 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -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
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index a51543b..e37ddc2 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -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)
{
More information about the wine-cvs
mailing list