new backend: glx: multiply color in APPLY_ALPHA

Because we use pre-multiplied alpha.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-05-10 08:42:48 +01:00
parent 80c7b2f7ec
commit 2d50d32bf7
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 1 deletions

View File

@ -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);