mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 03:48:03 +02:00
[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:
parent
f3153091b7
commit
c412e42c72
1 changed files with 10 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue