Commit 51d1e181 authored by Michael Catanzaro's avatar Michael Catanzaro Committed by Michael Catanzaro

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
parent 4bc7406e
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment