summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2016-06-30 14:17:30 -0500
committerMichael Catanzaro <mcatanzaro@gnome.org>2016-07-01 12:16:14 -0500
commit51d1e18193f74a53e32667cf1b550f889027fdf1 (patch)
tree50648a2b8fec1307fd97202df3456fda8de121c5 /tools
parent4bc7406ead4b434d1dd01e0262fe3eea556bc63c (diff)
downloadgnome-session-51d1e18193f74a53e32667cf1b550f889027fdf1.tar.gz
check-accelerated: export renderer string also for llvmpipe
Since the renderer string is now used to display the graphics label in gnome-control-center, we need to make sure it gets set even if software rendering is in use, else we wind up showing an empty string to the user. https://bugzilla.gnome.org/show_bug.cgi?id=768292
Diffstat (limited to 'tools')
-rw-r--r--tools/gnome-session-check-accelerated-gl-helper.c8
-rw-r--r--tools/gnome-session-check-accelerated.c20
2 files changed, 12 insertions, 16 deletions
diff --git a/tools/gnome-session-check-accelerated-gl-helper.c b/tools/gnome-session-check-accelerated-gl-helper.c
index 020f9a46..9a5d505f 100644
--- a/tools/gnome-session-check-accelerated-gl-helper.c
+++ b/tools/gnome-session-check-accelerated-gl-helper.c
@@ -469,13 +469,7 @@ main (int argc, char **argv)
goto out;
}
- if (has_llvmpipe) {
- _print_error ("llvmpipe detected.");
- ret = HELPER_SOFTWARE_RENDERING;
- goto out;
- }
-
- ret = HELPER_ACCEL;
+ ret = has_llvmpipe ? HELPER_SOFTWARE_RENDERING : HELPER_ACCEL;
if (print_renderer)
g_print ("%s", renderer);
diff --git a/tools/gnome-session-check-accelerated.c b/tools/gnome-session-check-accelerated.c
index b0557b0a..caade1c2 100644
--- a/tools/gnome-session-check-accelerated.c
+++ b/tools/gnome-session-check-accelerated.c
@@ -182,7 +182,7 @@ main (int argc, char **argv)
NULL, NULL, &renderer_string, NULL, &estatus, &gl_error)) {
is_accelerated = (WEXITSTATUS(estatus) == HELPER_ACCEL) || (WEXITSTATUS(estatus) == HELPER_SOFTWARE_RENDERING);
is_software_rendering = (WEXITSTATUS(estatus) == HELPER_SOFTWARE_RENDERING);
- if (is_accelerated)
+ if (is_accelerated || is_software_rendering)
goto finish;
g_clear_pointer (&renderer_string, g_free);
@@ -217,14 +217,6 @@ main (int argc, char **argv)
rootwin,
is_accelerated_atom,
XA_CARDINAL, 32, PropModeReplace, (guchar *) &is_accelerated, 1);
-
- XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
- rootwin,
- renderer_atom,
- XA_STRING, 8, PropModeReplace, (guchar *) renderer_string, strlen (renderer_string));
-
- /* Print the renderer */
- g_print ("%s", renderer_string);
}
if (is_software_rendering) {
@@ -234,6 +226,16 @@ main (int argc, char **argv)
XA_CARDINAL, 32, PropModeReplace, (guchar *) &is_software_rendering, 1);
}
+ if (is_accelerated || is_software_rendering) {
+ XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
+ rootwin,
+ renderer_atom,
+ XA_STRING, 8, PropModeReplace, (guchar *) renderer_string, strlen (renderer_string));
+
+ /* Print the renderer */
+ g_print ("%s", renderer_string);
+ }
+
gdk_display_sync (display);
return is_accelerated ? 0 : 1;