summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2019-11-04 11:45:13 +0100
committerRobert Mader <robert.mader@posteo.de>2019-11-04 16:06:37 +0100
commit5e87d67e5f3a9d61230b88fa62dd22668257e524 (patch)
tree218f471945012dde5e1423c87e97fb19ee7df4d2
parentf133de2dd42f4a3f5bf66ef476ce956d2e4931c9 (diff)
downloadmutter-5e87d67e5f3a9d61230b88fa62dd22668257e524.tar.gz
surface-actor-wayland: Do not send frame callbacks if the actor is obscured
`meta_surface_actor_is_obscured` implies that the actor got successfully culled out and nothing of it will get painted. This includes that there are no clones, no effects etc. In this cases we don't want to send frame callbacks, thus avoiding unnecessary client work. https://gitlab.gnome.org/GNOME/mutter/merge_requests/918
-rw-r--r--src/compositor/meta-surface-actor-wayland.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index 0b1c4ef01..c91dd8222 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -103,7 +103,8 @@ meta_surface_actor_wayland_paint (ClutterActor *actor)
{
MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (actor);
- if (self->surface)
+ if (self->surface &&
+ !meta_surface_actor_is_obscured (META_SURFACE_ACTOR (actor)))
{
MetaWaylandCompositor *compositor = self->surface->compositor;