[cairo-xlib-surface] Check that the acquire surfaces are xlib surfaces

_cairo_pattern_acquire_surfaces() may substitute an image surface for
either the source or the mask should the backend not support creation
of similar scratch surfaces or an error occurs during creation. For
composition we require xlib surfaces and so we must trigger the
fallback path if this happens.
This commit is contained in:
Chris Wilson 2007-05-02 21:17:39 +01:00
parent f3153091b7
commit c412e42c72

View file

@ -1287,6 +1287,16 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
if (status)
return status;
/* check for fallback surfaces that we cannot handle ... */
if (!_cairo_surface_is_xlib (&src->base)) {
status = CAIRO_INT_STATUS_UNSUPPORTED;
goto BAIL;
}
if (mask != NULL && !_cairo_surface_is_xlib (&mask->base)) {
status = CAIRO_INT_STATUS_UNSUPPORTED;
goto BAIL;
}
operation = _recategorize_composite_operation (dst, op, src, &src_attr,
mask_pattern != NULL);
if (operation == DO_UNSUPPORTED) {