[mutter] wayland/actor-surface: Always set opaque region on alpha-less textures
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/actor-surface: Always set opaque region on alpha-less textures
- Date: Fri, 2 Oct 2020 15:22:06 +0000 (UTC)
commit 71f03a718d4312589dd7048299ed1f32e740c4fa
Author: Robert Mader <robert mader posteo de>
Date: Thu Oct 1 00:33:45 2020 +0200
wayland/actor-surface: Always set opaque region on alpha-less textures
Wayland clients using buffers without alpha channel are not expected to
set an opaque region. However, we rely on the opaque region for the fast
painting path in `MetaShapedTexture`.
Thus, make sure to always set an opaque region internally in those cases.
For X11 clients, wo do so already.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1463
src/wayland/meta-wayland-actor-surface.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c
index ed7c45411e..50af540a23 100644
--- a/src/wayland/meta-wayland-actor-surface.c
+++ b/src/wayland/meta-wayland-actor-surface.c
@@ -225,7 +225,15 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
if (!META_IS_XWAYLAND_SURFACE (surface_role))
{
- if (surface->opaque_region)
+ if (!meta_shaped_texture_has_alpha (stex))
+ {
+ cairo_region_t *opaque_region;
+
+ opaque_region = cairo_region_create_rectangle (&surface_rect);
+ meta_surface_actor_set_opaque_region (surface_actor, opaque_region);
+ cairo_region_destroy (opaque_region);
+ }
+ else if (surface->opaque_region)
{
cairo_region_t *opaque_region;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]