glitz_surface_destroy (mask);  glitz_buffer_destroy (buffer); free (data);  return status;
cairo_surface_destroy (&mask->base);  if (glitz_surface_get_status (dst->surface) == GLITZ_STATUS_NOT_SUPPORTED) return CAIRO_INT_STATUS_UNSUPPORTED;  return CAIRO_STATUS_SUCCESS;
_cairo_glitz_surface_composite_trapezoids (cairo_operator_t op,					   cairo_surface_t *generic_src,					   void *abstract_dst,					   int x_src,					   int y_src,					   cairo_trapezoid_t *traps,					   int n_traps){    cairo_glitz_surface_t *dst = abstract_dst;    cairo_glitz_surface_t *src = (cairo_glitz_surface_t *) generic_src;    glitz_surface_t *mask = NULL;    glitz_float_t *vertices;    glitz_buffer_t *buffer;    glitz_geometry_format_t gf;    cairo_int_status_t status;    int x_dst, y_dst, x_rel, y_rel, width, height;    void *data;    if (op == CAIRO_OPERATOR_SATURATE)	return CAIRO_INT_STATUS_UNSUPPORTED;    if (generic_src->backend != dst->base.backend)	return CAIRO_INT_STATUS_UNSUPPORTED;    gf.mode = GLITZ_GEOMETRY_MODE_DIRECT;    gf.edge_hint = GLITZ_GEOMETRY_EDGE_HINT_GOOD_SMOOTH;    gf.primitive = GLITZ_GEOMETRY_PRIMITIVE_QUADS;    gf.type = GLITZ_DATA_TYPE_FLOAT;    gf.first = 0;    gf.count = n_traps * 4;    data = malloc (n_traps * 8 * sizeof (glitz_float_t));    if (!data)	return CAIRO_STATUS_NO_MEMORY;    buffer = glitz_buffer_create_for_data (data);    if (buffer == NULL) {	free (data);	return CAIRO_STATUS_NO_MEMORY;    }	    x_dst = traps[0].left.p1.x >> 16;    y_dst = traps[0].left.p1.y >> 16;	    vertices = glitz_buffer_map (buffer, GLITZ_BUFFER_ACCESS_WRITE_ONLY);    for (; n_traps; traps++, n_traps--) {	glitz_float_t top, bottom;	top = GLITZ_FIXED_TO_FLOAT (traps->top);	bottom = GLITZ_FIXED_TO_FLOAT (traps->bottom);		*vertices++ = GLITZ_FIXED_LINE_X_TO_FLOAT (traps->left, traps->top);	*vertices++ = top;	*vertices++ =	    GLITZ_FIXED_LINE_X_CEIL_TO_FLOAT (traps->right, traps->top);	*vertices++ = top;	*vertices++ =	    GLITZ_FIXED_LINE_X_CEIL_TO_FLOAT (traps->right, traps->bottom);	*vertices++ = bottom;	*vertices++ = GLITZ_FIXED_LINE_X_TO_FLOAT (traps->left, traps->bottom);	*vertices++ = bottom;    }    glitz_buffer_unmap (buffer);    if ((src->pattern.type == CAIRO_PATTERN_SURFACE) &&	(src->pattern.color.alpha != 1.0)) {	glitz_color_t color;		color.red = color.green = color.blue = 0;	color.alpha = src->pattern.color.alpha_short;    	mask = _glitz_surface_create_solid (dst->surface,					    GLITZ_STANDARD_A8,					    &color);    }    x_rel = (src->pattern_box.p1.x >> 16) + x_src - x_dst;    y_rel = (src->pattern_box.p1.y >> 16) + y_src - y_dst;    x_dst = src->pattern_box.p1.x >> 16;    y_dst = src->pattern_box.p1.y >> 16;        width = ((src->pattern_box.p2.x + 65535) >> 16) -	(src->pattern_box.p1.x >> 16);    height = ((src->pattern_box.p2.y + 65535) >> 16) -	(src->pattern_box.p1.y >> 16);        status = _glitz_composite (_glitz_operator (op),			       src->surface,			       mask,			       dst->surface,			       x_rel, y_rel,			       0, 0,			       x_dst, y_dst,			       width, height,			       buffer, &gf);    if (mask)	glitz_surface_destroy (mask);    glitz_buffer_destroy (buffer);    free (data);        return status;}