summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2023-03-16 18:16:13 +0800
committerDaniel van Vugt <daniel.van.vugt@canonical.com>2023-03-20 07:22:03 +0000
commit46e1ede687ba2dcab8d92d49833758c74617c37b (patch)
tree4f8cde918fc687093113a1be2a8b36d2fed13417
parent176418d0e7ac6a0418eea46669f33c8e3b03c4bd (diff)
downloadmutter-46e1ede687ba2dcab8d92d49833758c74617c37b.tar.gz
wayland/buffer: Avoid spamming the log when a buffer is not scanoutable
It's not really an error and we recover seamlessly. If someone really wants to check if/why direct scanout is failing then they can still use `env MUTTER_DEBUG=render,kms`. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2702 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2918>
-rw-r--r--src/wayland/meta-wayland-buffer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wayland/meta-wayland-buffer.c b/src/wayland/meta-wayland-buffer.c
index 628aeee1c..bd0a17af0 100644
--- a/src/wayland/meta-wayland-buffer.c
+++ b/src/wayland/meta-wayland-buffer.c
@@ -877,10 +877,9 @@ meta_wayland_buffer_try_acquire_scanout (MetaWaylandBuffer *buffer,
return NULL;
}
- g_return_val_if_fail (scanout, NULL);
-
- g_signal_connect (scanout, "scanout-failed",
- G_CALLBACK (on_scanout_failed), buffer);
+ if (scanout)
+ g_signal_connect (scanout, "scanout-failed",
+ G_CALLBACK (on_scanout_failed), buffer);
return scanout;
}