Weston does not do transparent backgrounds

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 26 15:33:15 UTC 2016


On Fri, 26 Aug 2016 16:02:19 +0530
"arunkrish20 ." <arunkrish20 at gmail.com> wrote:

> Hi All,
> 
> http://wayland-devel.freedesktop.narkive.com/dXZUCogH/desktop-shell-how-to-enable-really-alpha-blending-of-weston-background
> 
> Our question is related to above mentioned link question.
> 
> Environment
> OS : Linux kernel 3.14
> Version : Weston 1.9.0
> 
> Weston fbdev-backend.
> 
> In compositor-fbdev.c
> fbdev_output_create()
> 
> *called *
> gl_renderer->output_create(&output->base,
>                            (EGLNativeWindowType)NULL, NULL,
>                            gl_renderer->*opaque_attribs*,
>                            NULL, 0) < 0) {
>             weston_log("gl_renderer_output_create failed.\n");
> 
> *can be changed to*
> gl_renderer->output_create(&output->base,
>                            (EGLNativeWindowType)NULL, NULL,
>                            gl_renderer->*alpha_attribs*,
>                            NULL, 0) < 0) {
>             weston_log("gl_renderer_output_create failed.\n");
> 
> Is that change will give some help? I havn't tried. But in that link if we
> use fbdev-backend then there is no hope to expect the alpha.
> 
> Any update or direction, Could you please suggest...

Hi,

I can't say if that will help, that kind of use case was never
intended. What will happen depends on the kernel driver and the EGL
implementation, we cannot know what they (being proprietary) do.

After you get that working, you still need to get the framebuffer
rendered such that you actually get alpha < 1.0 on some parts. You
may have problems with Weston's rendering. A non-opaque surface is
always rendered with blending and weston never uses glClear, so that
might cause blending artifacts. OTOH, in some cases the
renderer deliberately ignores the alpha channel because Xwayland
surfaces used to have garbage there. I'm also not sure if the
blending equation used accounts for destination alpha != 1.0.
Therefore there may be a few things you have to fix before you see
anything.

I believe you'll find that the assumption of an opaque
primary framebuffer is quite deeply rooted in Weston.

Also note that GL support has been removed from the fbdev backend,
too. See:
https://cgit.freedesktop.org/wayland/weston/commit/src/compositor-fbdev.c?id=e77f8ad79bdf3613dc7e587ea0cf5b9d39e4f8e0


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160826/507fc2b9/attachment.sig>


More information about the wayland-devel mailing list