GUACAMOLE-282: Merge alpha fix for common surface transfer functions.

This commit is contained in:
James Muehlner 2017-04-26 20:17:24 -07:00
commit 008ba46597

View File

@ -724,51 +724,51 @@ static int __guac_common_surface_transfer_int(guac_transfer_function op, uint32_
break; break;
case GUAC_TRANSFER_BINARY_NSRC: case GUAC_TRANSFER_BINARY_NSRC:
*dst = ~(*src); *dst = *src ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_NDEST: case GUAC_TRANSFER_BINARY_NDEST:
*dst = ~(*dst); *dst = *dst ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_AND: case GUAC_TRANSFER_BINARY_AND:
*dst = (*dst) & (*src); *dst = ((*dst) & (0xFF000000 | *src));
break; break;
case GUAC_TRANSFER_BINARY_NAND: case GUAC_TRANSFER_BINARY_NAND:
*dst = ~((*dst) & (*src)); *dst = ((*dst) & (0xFF000000 | *src)) ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_OR: case GUAC_TRANSFER_BINARY_OR:
*dst = (*dst) | (*src); *dst = ((*dst) | (0x00FFFFFF & *src));
break; break;
case GUAC_TRANSFER_BINARY_NOR: case GUAC_TRANSFER_BINARY_NOR:
*dst = ~((*dst) | (*src)); *dst = ((*dst) | (0x00FFFFFF & *src)) ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_XOR: case GUAC_TRANSFER_BINARY_XOR:
*dst = (*dst) ^ (*src); *dst = ((*dst) ^ (0x00FFFFFF & *src));
break; break;
case GUAC_TRANSFER_BINARY_XNOR: case GUAC_TRANSFER_BINARY_XNOR:
*dst = ~((*dst) ^ (*src)); *dst = ((*dst) ^ (0x00FFFFFF & *src)) ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_NSRC_AND: case GUAC_TRANSFER_BINARY_NSRC_AND:
*dst = (*dst) & ~(*src); *dst = ((*dst) & (0xFF000000 | (*src ^ 0x00FFFFFF)));
break; break;
case GUAC_TRANSFER_BINARY_NSRC_NAND: case GUAC_TRANSFER_BINARY_NSRC_NAND:
*dst = ~((*dst) & ~(*src)); *dst = ((*dst) & (0xFF000000 | (*src ^ 0x00FFFFFF))) ^ 0x00FFFFFF;
break; break;
case GUAC_TRANSFER_BINARY_NSRC_OR: case GUAC_TRANSFER_BINARY_NSRC_OR:
*dst = (*dst) | ~(*src); *dst = ((*dst) | (0x00FFFFFF & (*src ^ 0x00FFFFFF)));
break; break;
case GUAC_TRANSFER_BINARY_NSRC_NOR: case GUAC_TRANSFER_BINARY_NSRC_NOR:
*dst = ~((*dst) | ~(*src)); *dst = ((*dst) | (0x00FFFFFF & (*src ^ 0x00FFFFFF))) ^ 0x00FFFFFF;
break; break;
} }