winex11.drv: Map more GDI raster operations to X11 equivalents
Dmitry Timoshkov
dmitry at codeweavers.com
Thu Feb 21 09:23:48 CST 2008
Hello,
Changelog:
winex11.drv: Map more GDI raster operations to X11 equivalents.
---
dlls/winex11.drv/bitblt.c | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 6f91413..d230fca 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -1389,12 +1389,41 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
}
return TRUE;
+ case SRCAND:
+ case SRCERASE:
case SRCCOPY: /* 0xcc */
case SRCINVERT:
+ case SRCPAINT:
+ case NOTSRCCOPY:
+ case MERGEPAINT:
+ case NOTSRCERASE:
+ {
+ int func;
+
+ switch (rop)
+ {
+ case SRCAND: func = GXand; break;
+ case SRCERASE: func = GXandReverse; break;
+ case SRCINVERT: func = GXxor; break;
+ case SRCPAINT: func = GXor; break;
+ case NOTSRCCOPY: func = GXcopyInverted; break;
+ case MERGEPAINT: func = GXorInverted; break;
+ case NOTSRCERASE: func = GXnand; break;
+ case SRCCOPY:
+ /* fall through */
+ default: func = GXcopy; break;
+ /* still could be added
+ * GXandInverted: NOT src AND dst
+ * GXnor: NOT src AND NOT dst
+ * GXequiv: NOT src XOR dst
+ * GXorReverse: src OR NOT dst
+ */
+ }
+
if (physDevSrc->depth == physDevDst->depth)
{
wine_tsx11_lock();
- XSetFunction( gdi_display, physDevDst->gc, rop == SRCCOPY ? GXcopy : GXxor );
+ XSetFunction( gdi_display, physDevDst->gc, func );
XCopyArea( gdi_display, physDevSrc->drawable,
physDevDst->drawable, physDevDst->gc,
physDevSrc->dc_rect.left + visRectSrc.left,
@@ -1415,7 +1444,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, rop == SRCCOPY ? GXcopy : GXxor );
+ XSetFunction( gdi_display, physDevDst->gc, func );
XCopyPlane( gdi_display, physDevSrc->drawable,
physDevDst->drawable, physDevDst->gc,
physDevSrc->dc_rect.left + visRectSrc.left,
@@ -1428,6 +1457,7 @@ static BOOL BITBLT_InternalStretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT
return TRUE;
}
break;
+ }
case PATCOPY: /* 0xf0 */
if (!X11DRV_SetupGCForBrush( physDevDst )) return TRUE;
--
1.5.4.1
More information about the wine-patches
mailing list