glsl-effect: Don't overwrite the framebuffer's alpha/X channel

It's a waste of effort and will also taint screenshots if they
accidentally store that channel as alpha.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6389
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650>
This commit is contained in:
Daniel van Vugt 2023-02-17 14:17:56 +08:00 committed by Marge Bot
parent d67077bdf1
commit ce8af73745

View File

@ -119,7 +119,7 @@ shell_glsl_effect_constructed (GObject *object)
if (G_UNLIKELY (klass->base_pipeline == NULL))
{
klass->base_pipeline = cogl_pipeline_new (ctx);
cogl_pipeline_set_blend (klass->base_pipeline, "RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))", NULL);
cogl_pipeline_set_blend (klass->base_pipeline, "RGB = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))", NULL);
if (klass->build_pipeline != NULL)
klass->build_pipeline (self);