Alexandre Julliard : winex11: Forward AlphaBlend with a DIB section as source to the null driver.

Alexandre Julliard julliard at winehq.org
Wed Sep 21 13:35:13 CDT 2011


Module: wine
Branch: master
Commit: ff2805cae00ebf854e2fd80c2a34af18e275180f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ff2805cae00ebf854e2fd80c2a34af18e275180f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 21 11:35:36 2011 +0200

winex11: Forward AlphaBlend with a DIB section as source to the null driver.

---

 dlls/winex11.drv/xrender.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index b83a9c9..e3fa09a 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2856,7 +2856,17 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
         return dst_dev->funcs->pAlphaBlend( dst_dev, dst, src_dev, src, blendfn );
     }
 
-    if (physdev_src != physdev_dst) X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_GdiMod );
+    if (physdev_dst != physdev_src)
+    {
+        int status = X11DRV_LockDIBSection( physdev_src->x11dev, DIB_Status_None );
+        if (status == DIB_Status_AppMod || status == DIB_Status_InSync)
+        {
+            X11DRV_UnlockDIBSection( physdev_src->x11dev, FALSE );
+            dst_dev = GET_NEXT_PHYSDEV( dst_dev, pAlphaBlend );
+            return dst_dev->funcs->pAlphaBlend( dst_dev, dst, src_dev, src, blendfn );
+        }
+        X11DRV_CoerceDIBSection( physdev_src->x11dev, DIB_Status_GdiMod );
+    }
     X11DRV_LockDIBSection( physdev_dst->x11dev, DIB_Status_GdiMod );
 
     dst_pict = get_xrender_picture( physdev_dst, 0, &dst->visrect );




More information about the wine-cvs mailing list