Index: win32ss/gdi/dib/alphablend.c =================================================================== --- win32ss/gdi/dib/alphablend.c (revision 71208) +++ win32ss/gdi/dib/alphablend.c (working copy) @@ -38,7 +38,7 @@ BLENDFUNCTION BlendFunc; register NICEPIXEL32 DstPixel32; register NICEPIXEL32 SrcPixel32; - UCHAR Alpha, SrcBpp = BitsPerFormat(Source->iBitmapFormat); + UCHAR Alpha; EXLATEOBJ* pexlo; EXLATEOBJ exloSrcRGB, exloDstRGB, exloRGBSrc; PFN_DIB_PutPixel pfnDibPutPixel = DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel; @@ -48,27 +48,6 @@ DestRect->left, DestRect->top, DestRect->right, DestRect->bottom); BlendFunc = BlendObj->BlendFunction; - if (BlendFunc.BlendOp != AC_SRC_OVER) - { - DPRINT1("BlendOp != AC_SRC_OVER\n"); - return FALSE; - } - if (BlendFunc.BlendFlags != 0) - { - DPRINT1("BlendFlags != 0\n"); - return FALSE; - } - if ((BlendFunc.AlphaFormat & ~AC_SRC_ALPHA) != 0) - { - DPRINT1("Unsupported AlphaFormat (0x%x)\n", BlendFunc.AlphaFormat); - return FALSE; - } - if ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0 && - SrcBpp != 32) - { - DPRINT1("Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n"); - return FALSE; - } if (!ColorTranslation) { Index: win32ss/gdi/dib/dib16bpp.c =================================================================== --- win32ss/gdi/dib/dib16bpp.c (revision 71208) +++ win32ss/gdi/dib/dib16bpp.c (working copy) @@ -589,27 +589,6 @@ DestRect->left, DestRect->top, DestRect->right, DestRect->bottom); BlendFunc = BlendObj->BlendFunction; - if (BlendFunc.BlendOp != AC_SRC_OVER) - { - DPRINT1("BlendOp != AC_SRC_OVER\n"); - return FALSE; - } - if (BlendFunc.BlendFlags != 0) - { - DPRINT1("BlendFlags != 0\n"); - return FALSE; - } - if ((BlendFunc.AlphaFormat & ~AC_SRC_ALPHA) != 0) - { - DPRINT1("Unsupported AlphaFormat (0x%x)\n", BlendFunc.AlphaFormat); - return FALSE; - } - if ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0 && - (BitsPerFormat(Source->iBitmapFormat) != 32)) - { - DPRINT1("Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n"); - return FALSE; - } if (!ColorTranslation) { Index: win32ss/gdi/dib/dib24bpp.c =================================================================== --- win32ss/gdi/dib/dib24bpp.c (revision 71208) +++ win32ss/gdi/dib/dib24bpp.c (working copy) @@ -477,27 +477,6 @@ DestRect->left, DestRect->top, DestRect->right, DestRect->bottom); BlendFunc = BlendObj->BlendFunction; - if (BlendFunc.BlendOp != AC_SRC_OVER) - { - DPRINT1("BlendOp != AC_SRC_OVER\n"); - return FALSE; - } - if (BlendFunc.BlendFlags != 0) - { - DPRINT1("BlendFlags != 0\n"); - return FALSE; - } - if ((BlendFunc.AlphaFormat & ~AC_SRC_ALPHA) != 0) - { - DPRINT1("Unsupported AlphaFormat (0x%x)\n", BlendFunc.AlphaFormat); - return FALSE; - } - if ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0 && - BitsPerFormat(Source->iBitmapFormat) != 32) - { - DPRINT1("Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n"); - return FALSE; - } Dst = (PUCHAR)((ULONG_PTR)Dest->pvScan0 + (DestRect->top * Dest->lDelta) + (DestRect->left * 3)); Index: win32ss/gdi/dib/dib32bpp.c =================================================================== --- win32ss/gdi/dib/dib32bpp.c (revision 71208) +++ win32ss/gdi/dib/dib32bpp.c (working copy) @@ -357,27 +357,6 @@ DestRect->left, DestRect->top, DestRect->right, DestRect->bottom); BlendFunc = BlendObj->BlendFunction; - if (BlendFunc.BlendOp != AC_SRC_OVER) - { - DPRINT1("BlendOp != AC_SRC_OVER\n"); - return FALSE; - } - if (BlendFunc.BlendFlags != 0) - { - DPRINT1("BlendFlags != 0\n"); - return FALSE; - } - if ((BlendFunc.AlphaFormat & ~AC_SRC_ALPHA) != 0) - { - DPRINT1("Unsupported AlphaFormat (0x%x)\n", BlendFunc.AlphaFormat); - return FALSE; - } - if ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0 && - BitsPerFormat(Source->iBitmapFormat) != 32) - { - DPRINT1("Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n"); - return FALSE; - } Dst = (PULONG)((ULONG_PTR)Dest->pvScan0 + (DestRect->top * Dest->lDelta) + (DestRect->left << 2)); Index: win32ss/gdi/eng/alphablend.c =================================================================== --- win32ss/gdi/eng/alphablend.c (revision 71208) +++ win32ss/gdi/eng/alphablend.c (working copy) @@ -89,6 +89,12 @@ DPRINT1("Unsupported AlphaFormat (0x%x)\n", BlendObj->BlendFunction.AlphaFormat); return FALSE; } + if ((BlendObj->BlendFunction.AlphaFormat & AC_SRC_ALPHA) != 0 && + BitsPerFormat(psoSource->iBitmapFormat) != 32) + { + DPRINT1("Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n"); + return FALSE; + } /* Check if there is anything to draw */ if (ClipRegion != NULL && @@ -111,6 +117,8 @@ if (!IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect, FALSE, &Translate, &OutputObj)) { + /* Release resources allocated by previous call */ + IntEngLeave(&EnterLeaveSource); return FALSE; } OutputRect.left += Translate.x;