[DRM] Alpha Background Support for the Kiosk Shell
This issue is a follow-up to this discussion: #710 (comment 2264604).
To summarize shortly. I'm trying to render a transparent Weston shell targeting a DRM backend. Then, that frame buffer will be blended on top of a video stream using FPGA logic.
So I started with a small hack to get alpha support in the kiosk shell:
diff --git a/kiosk-shell/kiosk-shell.c b/kiosk-shell/kiosk-shell.c
index 28805322..73902964 100644
--- a/kiosk-shell/kiosk-shell.c
+++ b/kiosk-shell/kiosk-shell.c
@@ -632,7 +632,7 @@ kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
curtain_params.r = ((bg_color >> 16) & 0xff) / 255.0;
curtain_params.g = ((bg_color >> 8) & 0xff) / 255.0;
curtain_params.b = ((bg_color >> 0) & 0xff) / 255.0;
- curtain_params.a = 1.0;
+ curtain_params.a = ((bg_color >> 24) & 0xff) / 255.0;
curtain_params.pos = output->pos;
curtain_params.width = output->width;
At first, I was using the Wayland backend natively to check what was going on, and that is where the first issue was. See the video, the window beneath it is flickering randomly and has a bunch of strange effects. Yes, I know, this is probably not supported, but what exactly could cause this, where do I start to get these flickers fixed?
Then, I proceeded with my embedded device, and thus now I'm using the DRM backend. There, I see another effect, the alpha works at first sight, but everything that gets drawn does stick. So e.g. if I move my mouse, I see the whole track of where my mouse passed. So this is somewhat different from using the Wayland backend but also doesn't work.
What I did check; alpha_{min,max} is set to 0 & 0xffff, and the used pixel format is ARGB8888.
I'm using Weston 13.0.0 and the Pixman render. Btw, this issue is potentially a duplicate (e.g. #9 and !1258 (merged)).