From 2d50d32bf777ec95fbbde6bdab4cee62f42799d8 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 10 May 2019 08:42:48 +0100 Subject: [PATCH] new backend: glx: multiply color in APPLY_ALPHA Because we use pre-multiplied alpha. Signed-off-by: Yuxuan Shui --- src/backend/gl/gl_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/gl/gl_common.c b/src/backend/gl/gl_common.c index 70ade2d..a56a934 100644 --- a/src/backend/gl/gl_common.c +++ b/src/backend/gl/gl_common.c @@ -979,7 +979,7 @@ static inline void gl_image_decouple(backend_t *base, struct gl_image *img) { static void gl_image_apply_alpha(backend_t *base, struct gl_image *img, const region_t *reg_op, double alpha) { glBlendFunc(GL_ONE, GL_CONSTANT_COLOR); - glBlendColor(1, 1, 1, (GLclampf)alpha); + glBlendColor((GLclampf)alpha, (GLclampf)alpha, (GLclampf)alpha, (GLclampf)alpha); GLuint fbo; glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);