1
0
Fork 0
mutter-performance-pkgbuild/0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch
2019-12-28 21:07:07 +01:00

33 lines
1.2 KiB
Diff

From a2789eef9adbb8fb5e3ba1c278041996fa69eedc Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@posteo.de>
Date: Mon, 4 Nov 2019 11:45:13 +0100
Subject: [PATCH 2/3] 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
---
src/compositor/meta-surface-actor-wayland.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index 1c933d554..e16f53ff2 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -115,7 +115,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;
--
2.24.1