From 60ac2838b5964979c722f43700e2382d7d206aea Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Fri, 12 Oct 2018 14:19:24 +0200 Subject: [PATCH] renderer/native: Move primary GPU choosing later Moves the primary GPU choosing to after all secondary gpu data has been created. This makes it possible for a future patch to start looking at secondary gpu data in choose_primary_gpu () to determine if it is using a hardware driver or a software renderer. Co-authored by: Pekka Paalanen https://gitlab.gnome.org/GNOME/mutter/merge_requests/271 --- src/backends/native/meta-renderer-native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index 51a7a2cd1..bd63347c8 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -3659,8 +3659,6 @@ meta_renderer_native_initable_init (GInitable *initable, GList *gpus; GList *l; - renderer_native->primary_gpu_kms = choose_primary_gpu (monitor_manager); - gpus = meta_monitor_manager_get_gpus (monitor_manager); for (l = gpus; l; l = l->next) { @@ -3670,6 +3668,8 @@ meta_renderer_native_initable_init (GInitable *initable, return FALSE; } + renderer_native->primary_gpu_kms = choose_primary_gpu (monitor_manager); + return TRUE; }