mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-14 11:00:28 +01:00
Avoid using substituted surfaces for xlib operations.
Detect when a substitute image surface is returned for a solid pattern, and avoid mixed image/xlib composite operations. This can happen for example if there is a resource allocation failure during creating a similar surface.
This commit is contained in:
parent
751976970b
commit
ea4945850a
1 changed files with 6 additions and 1 deletions
|
|
@ -1217,7 +1217,12 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst,
|
|||
{
|
||||
cairo_bool_t is_integer_translation =
|
||||
_cairo_matrix_is_integer_translation (&src_attr->matrix, NULL, NULL);
|
||||
cairo_bool_t needs_alpha_composite =
|
||||
cairo_bool_t needs_alpha_composite;
|
||||
|
||||
if (!_cairo_surface_is_xlib (&src->base))
|
||||
return DO_UNSUPPORTED;
|
||||
|
||||
needs_alpha_composite =
|
||||
_operator_needs_alpha_composite (op, _surface_has_alpha (src));
|
||||
|
||||
if (!have_mask &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue