mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 12:46:32 +01:00
image-surface/software rendering as preference
This commit is contained in:
parent
d6a5e6fc2e
commit
c6e0c8430f
3 changed files with 30 additions and 3 deletions
|
|
@ -21,6 +21,10 @@
|
||||||
#include "gtk2ardour-config.h"
|
#include "gtk2ardour-config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined USE_CAIRO_IMAGE_SURFACE && !defined NDEBUG
|
||||||
|
#define OPTIONAL_CAIRO_IMAGE_SURFACE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cairo/cairo.h>
|
#include <cairo/cairo.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
@ -2776,15 +2780,28 @@ RCOptionEditor::RCOptionEditor ()
|
||||||
|
|
||||||
/* INTERFACE */
|
/* INTERFACE */
|
||||||
|
|
||||||
|
#ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
|
||||||
|
BoolOption* bgo = new BoolOption (
|
||||||
|
"cairo-image-surface",
|
||||||
|
_("Disable Graphics Hardware Acceleration (requires restart)"),
|
||||||
|
sigc::mem_fun (*_ui_config, &UIConfiguration::get_cairo_image_surface),
|
||||||
|
sigc::mem_fun (*_ui_config, &UIConfiguration::set_cairo_image_surface)
|
||||||
|
);
|
||||||
|
|
||||||
|
Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (
|
||||||
|
_("Render large parts of the application user-interface in software, instead of using 2D-graphics acceleration.\nThis requires restarting %1 before having an effect"), PROGRAM_NAME));
|
||||||
|
add_option (S_("Preferences|GUI"), bgo);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
|
#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
|
||||||
BoolOption* bgo = new BoolOption (
|
BoolOption* bgo = new BoolOption (
|
||||||
"buggy-gradients",
|
"buggy-gradients",
|
||||||
_("Possibly improve slow graphical performance"),
|
_("Possibly improve slow graphical performance (requires restart)"),
|
||||||
sigc::mem_fun (*_ui_config, &UIConfiguration::get_buggy_gradients),
|
sigc::mem_fun (*_ui_config, &UIConfiguration::get_buggy_gradients),
|
||||||
sigc::mem_fun (*_ui_config, &UIConfiguration::set_buggy_gradients)
|
sigc::mem_fun (*_ui_config, &UIConfiguration::set_buggy_gradients)
|
||||||
);
|
);
|
||||||
|
|
||||||
Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (_("This requires restarting %1 before having an effect"), PROGRAM_NAME));
|
Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (_("Disables hardware gradient rendering on buggy video drivers (\"buggy gradients patch\").\nThis requires restarting %1 before having an effect"), PROGRAM_NAME));
|
||||||
add_option (S_("Preferences|GUI"), bgo);
|
add_option (S_("Preferences|GUI"), bgo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined USE_CAIRO_IMAGE_SURFACE && !defined NDEBUG
|
||||||
|
#define OPTIONAL_CAIRO_IMAGE_SURFACE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -156,6 +160,11 @@ UIConfiguration::pre_gui_init ()
|
||||||
if (get_buggy_gradients()) {
|
if (get_buggy_gradients()) {
|
||||||
g_setenv ("FORCE_BUGGY_GRADIENTS", "1", 1);
|
g_setenv ("FORCE_BUGGY_GRADIENTS", "1", 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
|
||||||
|
if (get_cairo_image_surface()) {
|
||||||
|
g_setenv ("ARDOUR_IMAGE_SURFACE", "1", 1);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,4 +72,5 @@ UI_CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.09339
|
||||||
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
|
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
|
||||||
UI_CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
|
UI_CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
|
||||||
UI_CONFIG_VARIABLE (bool, buggy_gradients, "buggy-gradients", false)
|
UI_CONFIG_VARIABLE (bool, buggy_gradients, "buggy-gradients", false)
|
||||||
|
UI_CONFIG_VARIABLE (bool, cairo_image_surface, "cairo-image-surface", false)
|
||||||
UI_CONFIG_VARIABLE (uint64_t, waveform_cache_size, "waveform-cache-size", 100) /* units of megagbytes */
|
UI_CONFIG_VARIABLE (uint64_t, waveform_cache_size, "waveform-cache-size", 100) /* units of megagbytes */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue