On Wed, 18 Apr 2018 15:44:26 +0200
Emre Ucan <eu...@de.adit-jv.com> wrote:

> If view is set to be entirely transparent,
> there is no need to accumulate its damage.
> 
> This is an important optimization for
> using view transparency. Because otherwise
> transparent views are rendered like an
> opaque view, and their pixel values
> are set to 0 in fragment shader.
> 
> Signed-off-by: Emre Ucan <eu...@de.adit-jv.com>
> ---
>  libweston/compositor.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/libweston/compositor.c b/libweston/compositor.c
> index a9de4ac..4bcf120 100644
> --- a/libweston/compositor.c
> +++ b/libweston/compositor.c
> @@ -2122,7 +2122,10 @@ compositor_accumulate_damage(struct weston_compositor 
> *ec)
>               pixman_region32_init(&opaque);
>  
>               wl_list_for_each(ev, &ec->view_list, link) {
> -                     if (ev->plane != plane)
> +                     /* If view is set to be entirely transparent,
> +                      * there is no need to accumulate its damage.
> +                      */
> +                     if (ev->plane != plane || ev->alpha == 0.0f)
>                               continue;
>  
>                       view_accumulate_damage(ev, &opaque);

Hi,

why this instead of removing the whole view from the scenegraph?

You would also need to exclude the view in
weston_compositor_pick_view(), and adding these rendering special cases
around doesn't feel very good to me.


Thanks,
pq

Attachment: pgpprJyLmfGul.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to