[mutter] renderer-native: Don't attempt to queue mode sets on non-onscreen views
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] renderer-native: Don't attempt to queue mode sets on non-onscreen views
- Date: Wed, 9 Jun 2021 17:54:55 +0000 (UTC)
commit 8478db96f9b8507cc025e16c52187bd86fb26b1d
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Jun 9 18:28:46 2021 +0200
renderer-native: Don't attempt to queue mode sets on non-onscreen views
A view is only a 'CoglOnscreen' if it ends up on a CRTC, thus needs a
mode. Other views are for virtual monitors, and require no mode setting,
so exclude them from the pending mode set list.
This avoids a dead lock when we'll be waiting indefinitely for mode
setting on a virtual monitor.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1891>
src/backends/native/meta-renderer-native.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index f12e2dda74..a84f3025f0 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -829,10 +829,22 @@ static void
meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
{
MetaRenderer *renderer = META_RENDERER (renderer_native);
+ GList *l;
g_list_free (renderer_native->pending_mode_set_views);
- renderer_native->pending_mode_set_views =
- g_list_copy (meta_renderer_get_views (renderer));
+ for (l = meta_renderer_get_views (renderer); l; l = l->next)
+ {
+ ClutterStageView *stage_view = l->data;
+ CoglFramebuffer *framebuffer =
+ clutter_stage_view_get_onscreen (stage_view);
+
+ if (COGL_IS_ONSCREEN (framebuffer))
+ {
+ renderer_native->pending_mode_set_views =
+ g_list_prepend (renderer_native->pending_mode_set_views,
+ stage_view);
+ }
+ }
renderer_native->pending_mode_set = TRUE;
meta_topic (META_DEBUG_KMS, "Queue mode set");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]