/* Optimize the current operator based on opacity of source or destination The output operator should be mathematically equivalent to the source.  */
static pixman_op_t optimize_operator(pixman_op_t op, uint32_t src_flags, uint32_t mask_flags, uint32_t dst_flags)
/* Optimize the current operator based on opacity of source or destination The output operator should be mathematically equivalent to the source.  */
static pixman_op_t optimize_operator(pixman_op_t op, uint32_t src_flags, uint32_t mask_flags, uint32_t dst_flags)
{
    pixman_bool_t is_source_opaque, is_dest_opaque;
#define OPAQUE_SHIFT 13
    COMPILE_TIME_ASSERT (FAST_PATH_IS_OPAQUE == (1 << OPAQUE_SHIFT));
    is_dest_opaque = (dst_flags & FAST_PATH_IS_OPAQUE);
    is_source_opaque = ((src_flags & mask_flags) & FAST_PATH_IS_OPAQUE);
    is_dest_opaque >>= OPAQUE_SHIFT - 1;
    is_source_opaque >>= OPAQUE_SHIFT;
    return operator_table[op].opaque_info[is_dest_opaque | is_source_opaque];
}