fix bad definition of COLOR_BLEND_FLAGS_MASK

This commit is contained in:
Vincent Wei
2021-05-05 22:08:09 +08:00
parent 3f99c7b960
commit 86158f938d
3 changed files with 4 additions and 4 deletions

View File

@@ -5170,7 +5170,7 @@ MG_EXPORT BOOL GUIAPI FillBitmapPartInBox (HDC hdc, int box_x, int box_y,
*/
typedef enum {
COLOR_BLEND_LEGACY = 0,
COLOR_BLEND_FLAGS_MASK = 0xFFFFFF00,
COLOR_BLEND_FLAGS_MASK = 0x00FF,
/** Porter Duff rule: clear */
COLOR_BLEND_PD_CLEAR = 0x0100, // PIXMAN_OP_CLEAR = 0x00

View File

@@ -348,7 +348,7 @@ int GAL_SetupBlitting (GAL_Surface *src, GAL_Surface *dst, DWORD ops)
else
ctxt->msk_img = NULL;
ops &= ~COLOR_BLEND_FLAGS_MASK;
ops &= COLOR_BLEND_FLAGS_MASK;
if (ops == COLOR_BLEND_LEGACY) {
if ((src->flags & GAL_SRCPIXELALPHA) && src->format->Amask && src != dst) {
ctxt->op = PIXMAN_OP_OVER;

View File

@@ -295,7 +295,7 @@ int GAL_SetupStretchBlit (GAL_Surface *src, GAL_Rect *srcrect,
ctxt->filter = PIXMAN_FILTER_FAST;
}
ops &= ~COLOR_BLEND_FLAGS_MASK;
ops &= COLOR_BLEND_FLAGS_MASK;
if (ops == COLOR_BLEND_LEGACY) {
if ((src->flags & GAL_SRCPIXELALPHA) && src->format->Amask && src != dst) {
ctxt->op = PIXMAN_OP_OVER;
@@ -388,7 +388,7 @@ int GAL_StretchBlt (GAL_Surface *src, GAL_Rect *srcrect,
if (src_img == NULL || dst_img == NULL || (src->flags & GAL_SRCCOLORKEY))
return GAL_StretchBltLegacy (src, srcrect, dst, dstrect,
ops & ~COLOR_BLEND_FLAGS_MASK);
ops & COLOR_BLEND_FLAGS_MASK);
if (src->blit_ctxt) {
GAL_BlittingContext* ctxt = src->blit_ctxt;