summarylogtreecommitdiffstats
path: root/918.patch
blob: a59a483421bd0f0ff148c477982286b31bdcb1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 1b26e414eccc33e26c464b282739315cb24f8f38 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] 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, 3 insertions(+)

diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index 0b1c4ef01..e0335348f 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -103,6 +103,9 @@ meta_surface_actor_wayland_paint (ClutterActor *actor)
 {
   MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (actor);
 
+  if (meta_surface_actor_is_obscured (META_SURFACE_ACTOR (actor)))
+    return;
+
   if (self->surface)
     {
       MetaWaylandCompositor *compositor = self->surface->compositor;
-- 
2.22.0