mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-04 22:40:12 +01:00
glamor: handle NULL source picture
COMPOSITE_REGION() can pass NULL as a source picture, make sure we
handle that nicely in both glamor_composite_clipped_region() and
glamor_composite_choose_shader().
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101894
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit bd353e9b84)
This commit is contained in:
parent
baa2531501
commit
421814bc81
1 changed files with 3 additions and 2 deletions
|
|
@ -992,7 +992,7 @@ glamor_composite_choose_shader(CARD8 op,
|
|||
goto fail;
|
||||
}
|
||||
} else {
|
||||
if (!glamor_render_format_is_supported(source->format)) {
|
||||
if (source && !glamor_render_format_is_supported(source->format)) {
|
||||
glamor_fallback("Unsupported source picture format.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -1411,7 +1411,8 @@ glamor_composite_clipped_region(CARD8 op,
|
|||
x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height);
|
||||
|
||||
/* Is the composite operation equivalent to a copy? */
|
||||
if (!mask && !source->alphaMap && !dest->alphaMap
|
||||
if (source &&
|
||||
!mask && !source->alphaMap && !dest->alphaMap
|
||||
&& source->pDrawable && !source->transform
|
||||
/* CopyArea is only defined with matching depths. */
|
||||
&& dest->pDrawable->depth == source->pDrawable->depth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue