mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 07:20:16 +01:00
[cairo-xlib] Check source for XRender support.
Do not rely on the assumption that if the destination has render support then the source has it as well - breaks when the boilerplate disables render support for a surface. Similarly do not set the XRender attributes on the source surface unless it actually has a xrender_format.
This commit is contained in:
parent
5c08226a0f
commit
3211d810d3
1 changed files with 9 additions and 8 deletions
|
|
@ -1198,10 +1198,8 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst,
|
|||
return DO_XCOPYAREA;
|
||||
}
|
||||
|
||||
if (!dst->buggy_repeat)
|
||||
return DO_RENDER;
|
||||
|
||||
if (is_integer_translation &&
|
||||
if (dst->buggy_repeat &&
|
||||
is_integer_translation &&
|
||||
src_attr->extend == CAIRO_EXTEND_REPEAT &&
|
||||
(src->width != 1 || src->height != 1))
|
||||
{
|
||||
|
|
@ -1215,6 +1213,9 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst,
|
|||
return DO_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE (src))
|
||||
return DO_UNSUPPORTED;
|
||||
|
||||
return DO_RENDER;
|
||||
}
|
||||
|
||||
|
|
@ -1319,13 +1320,13 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
|
|||
goto BAIL;
|
||||
}
|
||||
|
||||
status = _cairo_xlib_surface_set_attributes (src, &src_attr);
|
||||
if (status)
|
||||
goto BAIL;
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
case DO_RENDER:
|
||||
status = _cairo_xlib_surface_set_attributes (src, &src_attr);
|
||||
if (status)
|
||||
goto BAIL;
|
||||
|
||||
_cairo_xlib_surface_ensure_dst_picture (dst);
|
||||
if (mask) {
|
||||
status = _cairo_xlib_surface_set_attributes (mask, &mask_attr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue