13
0

only use and present the buggy gradient parameter if built with a suitably patched version of Cairo

This commit is contained in:
Paul Davis 2015-05-28 13:27:38 -04:00
parent 173b007779
commit 48c4ad8004
2 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,8 @@
#include "gtk2ardour-config.h"
#endif
#include <cairo/cairo.h>
#include <boost/algorithm/string.hpp>
#include <gtkmm/liststore.h>
@ -2644,6 +2646,7 @@ RCOptionEditor::RCOptionEditor ()
/* INTERFACE */
#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
BoolOption* bgo = new BoolOption (
"buggy-gradients",
_("Possibly improve slow graphical performance"),
@ -2653,7 +2656,8 @@ RCOptionEditor::RCOptionEditor ()
Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (_("This requires restarting %1 before having an effect"), PROGRAM_NAME));
add_option (S_("Preferences|GUI"), bgo);
#endif
add_option (S_("Preferences|GUI"),
new BoolOption (
"widget-prelight",

View File

@ -23,6 +23,8 @@
#include <cstdlib>
#include <cstdio> /* for snprintf, grrr */
#include <cairo/cairo.h>
#include <glibmm/miscutils.h>
#include <glib/gstdio.h>
@ -150,10 +152,11 @@ UIConfiguration::map_parameters (boost::function<void (std::string)>& functor)
int
UIConfiguration::pre_gui_init ()
{
#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
if (get_buggy_gradients()) {
g_setenv ("FORCE_BUGGY_GRADIENTS", "1", 1);
}
#endif
return 0;
}