Actually pass the blend function on to the graphics driver.

This commit is contained in:
Huw Davies 2004-08-06 18:59:31 +00:00 committed by Alexandre Julliard
parent 42c8b413da
commit 2bf1562c28
4 changed files with 9 additions and 8 deletions

View File

@ -404,20 +404,21 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig
{
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 );
}

View File

@ -52,7 +52,7 @@ typedef struct tagDC_FUNCS
{
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);

View File

@ -120,7 +120,7 @@ extern unsigned int X11DRV_server_startticks;
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 );

View File

@ -1518,7 +1518,7 @@ done:
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 @@ void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev)
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;