gAlphaBlendChecked = PR_TRUE;
gAlphaBlendChecked = TRUE;
_cairo_win32_surface_composite (cairo_operator_t	operator,				cairo_pattern_t       	*pattern,				cairo_pattern_t		*mask_pattern,				void			*abstract_dst,				int			src_x,				int			src_y,				int			mask_x,				int			mask_y,				int			dst_x,				int			dst_y,				unsigned int		width,				unsigned int		height){    cairo_win32_surface_t *dst = abstract_dst;    cairo_win32_surface_t *src;    cairo_surface_pattern_t *src_surface_pattern;    int alpha;    int integer_transform;    int itx, ity;    if (!gAlphaBlendChecked) {	OSVERSIONINFO os;    	os.dwOSVersionInfoSize = sizeof(os);	GetVersionEx(&os);	// If running on Win98, disable using AlphaBlend()	// to avoid Win98 AlphaBlend() bug	if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId ||	    os.dwMajorVersion != 4 || os.dwMinorVersion != 10) {	    gAlphaBlend = (ALPHABLENDPROC)GetProcAddress(LoadLibrary("msimg32"),							 "AlphaBlend");	}	gAlphaBlendChecked = PR_TRUE;    }    if (pattern->type != CAIRO_PATTERN_SURFACE ||	pattern->extend != CAIRO_EXTEND_NONE)	return CAIRO_INT_STATUS_UNSUPPORTED;    if (mask_pattern) {	/* FIXME: When we fully support RENDER style 4-channel	 * masks we need to check r/g/b != 1.0.	 */	if (mask_pattern->type != CAIRO_PATTERN_SOLID)	    return CAIRO_INT_STATUS_UNSUPPORTED;	alpha = ((cairo_solid_pattern_t *)mask_pattern)->color.alpha_short >> 8;    } else {        alpha = 255;    }    src_surface_pattern = (cairo_surface_pattern_t *)pattern;    src = (cairo_win32_surface_t *)src_surface_pattern->surface;    if (src->base.backend != dst->base.backend)	return CAIRO_INT_STATUS_UNSUPPORTED;        integer_transform = _cairo_matrix_is_integer_translation (&pattern->matrix, &itx, &ity);    if (!integer_transform)	return CAIRO_INT_STATUS_UNSUPPORTED;    if (alpha == 255 &&	src->format == dst->format &&	(operator == CAIRO_OPERATOR_SOURCE ||	 (src->format == CAIRO_FORMAT_RGB24 && operator == CAIRO_OPERATOR_OVER))) {		if (!BitBlt (dst->dc,		     dst_x, dst_y,		     width, height,		     src->dc,		     src_x + itx, src_y + ity,		     SRCCOPY))	    return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite");	return CAIRO_STATUS_SUCCESS;	    } else if (integer_transform &&	       (src->format == CAIRO_FORMAT_RGB24 || src->format == CAIRO_FORMAT_ARGB32) &&	       dst->format == CAIRO_FORMAT_RGB24 &&	       !src->base.repeat &&	       operator == CAIRO_OPERATOR_OVER) {	BLENDFUNCTION blend_function;	blend_function.BlendOp = AC_SRC_OVER;	blend_function.BlendFlags = 0;	blend_function.SourceConstantAlpha = alpha;	blend_function.AlphaFormat = src->format == CAIRO_FORMAT_ARGB32 ? AC_SRC_ALPHA : 0;	if (!gAlphaBlend)	    return CAIRO_INT_STATUS_UNSUPPORTED;	if (!gAlphaBlend(dst->dc,			 dst_x, dst_y,			 width, height,			 src->dc,			 src_x + itx, src_y + ity,			 width, height,			 blend_function))	    return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite");	return CAIRO_STATUS_SUCCESS;    }        return CAIRO_INT_STATUS_UNSUPPORTED;}