From dec8577e4b1cc75e385308972258e33820c89a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 7 Aug 2023 22:15:25 +0200 Subject: [PATCH] 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: --- cogl/cogl/cogl-framebuffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index 667d080df..5e2026bc8 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -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,