gdi: alphablend function

Huw D M Davies h.davies1 at physics.ox.ac.uk
Fri Aug 6 06:43:40 CDT 2004


        Huw Davies <huw at codeweavers.com>
        Actually pass the blend function on to the graphics driver.
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/gdi/gdi_private.h
===================================================================
RCS file: /home/wine/wine/dlls/gdi/gdi_private.h,v
retrieving revision 1.13
diff -u -r1.13 gdi_private.h
--- dlls/gdi/gdi_private.h	2 Aug 2004 18:54:54 -0000	1.13
+++ dlls/gdi/gdi_private.h	6 Aug 2004 11:41:01 -0000
@@ -52,7 +52,7 @@
 {
     INT      (*pAbortDoc)(PHYSDEV);
     BOOL     (*pAbortPath)(PHYSDEV);
-    BOOL     (*pAlphaBlend)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,INT,INT,DWORD);
+    BOOL     (*pAlphaBlend)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,INT,INT,BLENDFUNCTION);
     BOOL     (*pAngleArc)(PHYSDEV,INT,INT,DWORD,FLOAT,FLOAT);
     BOOL     (*pArc)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
     BOOL     (*pArcTo)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
Index: dlls/gdi/bitblt.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/bitblt.c,v
retrieving revision 1.3
diff -u -r1.3 bitblt.c
--- dlls/gdi/bitblt.c	2 Aug 2004 18:54:54 -0000	1.3
+++ dlls/gdi/bitblt.c	6 Aug 2004 11:41:01 -0000
@@ -404,20 +404,21 @@
 {
     BOOL ret = FALSE;
     DC *dcDst, *dcSrc;
-    DWORD bfn = 0;
 
     if ((dcSrc = DC_GetDCUpdate( hdcSrc ))) GDI_ReleaseObj( hdcSrc );
     /* FIXME: there is a race condition here */
     if ((dcDst = DC_GetDCUpdate( hdcDst )))
     {
         dcSrc = DC_GetDCPtr( hdcSrc );
-        TRACE("%p %d,%d %dx%d -> %p %d,%d %dx%d blend=%08lx\n",
+        TRACE("%p %d,%d %dx%d -> %p %d,%d %dx%d op=%02x flags=%02x srcconstalpha=%02x alphafmt=%02x\n",
               hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
-              hdcDst, xDst, yDst, widthDst, heightDst, bfn );
+              hdcDst, xDst, yDst, widthDst, heightDst,
+              blendFunction.BlendOp, blendFunction.BlendFlags,
+              blendFunction.SourceConstantAlpha, blendFunction.AlphaFormat);
         if (dcDst->funcs->pAlphaBlend)
             ret = dcDst->funcs->pAlphaBlend( dcDst->physDev, xDst, yDst, widthDst, heightDst,
                                              dcSrc ? dcSrc->physDev : NULL,
-                                             xSrc, ySrc, widthSrc, heightSrc, bfn );
+                                             xSrc, ySrc, widthSrc, heightSrc, blendFunction );
         if (dcSrc) GDI_ReleaseObj( hdcSrc );
         GDI_ReleaseObj( hdcDst );
     }
Index: dlls/x11drv/x11drv.h
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11drv.h,v
retrieving revision 1.31
diff -u -r1.31 x11drv.h
--- dlls/x11drv/x11drv.h	2 Aug 2004 18:54:54 -0000	1.31
+++ dlls/x11drv/x11drv.h	6 Aug 2004 11:41:01 -0000
@@ -120,7 +120,7 @@
 extern BOOL X11DRV_AlphaBlend( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
                                INT widthDst, INT heightDst,
                                X11DRV_PDEVICE *physDevSrc, INT xSrc, INT ySrc,
-                               INT widthSrc, INT heightSrc, DWORD blendfn );
+                               INT widthSrc, INT heightSrc, BLENDFUNCTION blendfn );
 extern BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
                              INT width, INT height, X11DRV_PDEVICE *physDevSrc,
                              INT xSrc, INT ySrc, DWORD rop );
Index: dlls/x11drv/xrender.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/xrender.c,v
retrieving revision 1.44
diff -u -r1.44 xrender.c
--- dlls/x11drv/xrender.c	4 Aug 2004 18:15:42 -0000	1.44
+++ dlls/x11drv/xrender.c	6 Aug 2004 11:41:01 -0000
@@ -1518,7 +1518,7 @@
 
 BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, INT heightDst,
                        X11DRV_PDEVICE *devSrc, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc,
-                       DWORD blendfn)
+                       BLENDFUNCTION blendfn)
 {
     XRenderPictureAttributes pa;
     XRenderPictFormat *src_format;
@@ -1679,7 +1679,7 @@
 
 BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, INT heightDst,
                        X11DRV_PDEVICE *devSrc, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc,
-                       DWORD blendfn)
+                       BLENDFUNCTION blendfn)
 {
   FIXME("not supported - XRENDER headers were missing at compile time\n");
   return FALSE;



More information about the wine-patches mailing list