winex11.drv: Add an optimized path for BitBlt(SRCINVERT)

Dmitry Timoshkov dmitry at codeweavers.com
Thu Feb 21 04:24:48 CST 2008


Hello,

this patch should fix the bug 11553.

Changelog:
    winex11.drv: Add an optimized path for BitBlt(SRCINVERT).
---
 dlls/winex11.drv/bitblt.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 771a52b..6f91413 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -1390,10 +1390,11 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
 	return TRUE;
 
     case SRCCOPY:  /* 0xcc */
+    case SRCINVERT:
         if (physDevSrc->depth == physDevDst->depth)
         {
             wine_tsx11_lock();
-            XSetFunction( gdi_display, physDevDst->gc, GXcopy );
+            XSetFunction( gdi_display, physDevDst->gc, rop == SRCCOPY ? GXcopy : GXxor );
             XCopyArea( gdi_display, physDevSrc->drawable,
                        physDevDst->drawable, physDevDst->gc,
                        physDevSrc->dc_rect.left + visRectSrc.left,
@@ -1414,7 +1415,7 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
 
             XSetBackground( gdi_display, physDevDst->gc, fg );
             XSetForeground( gdi_display, physDevDst->gc, bg );
-            XSetFunction( gdi_display, physDevDst->gc, GXcopy );
+            XSetFunction( gdi_display, physDevDst->gc, rop == SRCCOPY ? GXcopy : GXxor );
             XCopyPlane( gdi_display, physDevSrc->drawable,
                         physDevDst->drawable, physDevDst->gc,
                         physDevSrc->dc_rect.left + visRectSrc.left,
-- 
1.5.4.1






More information about the wine-patches mailing list