1
0
Fork 0

cogl/framebuffer: Fix blitting from premult to opaque

We stopped putting "premultiplied" in opaque formats - that broke the
condition in cogl_blit_framebuffer() if the source was ARGB, but the
target was XRGB.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3159>
This commit is contained in:
Jonas Ådahl 2023-08-07 22:15:25 +02:00 committed by Marge Bot
parent 0cf4185885
commit dec8577e4b

View file

@ -1605,8 +1605,9 @@ cogl_blit_framebuffer (CoglFramebuffer *framebuffer,
}
/* The buffers must use the same premult convention */
if ((priv->internal_format & COGL_PREMULT_BIT) !=
(dst_priv->internal_format & COGL_PREMULT_BIT))
if (((priv->internal_format & COGL_PREMULT_BIT) !=
(dst_priv->internal_format & COGL_PREMULT_BIT)) &&
dst_priv->internal_format & COGL_A_BIT)
{
g_set_error_literal (error, COGL_SYSTEM_ERROR,
COGL_SYSTEM_ERROR_UNSUPPORTED,