From 2f0914c73060bad387bf2d92e5eae2de51b6d1e0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 24 Mar 2020 14:24:14 +0100 Subject: Allow to disable use of NSGLView On recent Mac systems (Catalina) OpenGL is slower compared to directly using GTK's NSView. Furthermore when compiled on Catalina, and running on a system with a Retina screen, the initial size of the canvas may be wrong: libs/gtkmm2ext/nsglview.mm:175:1: warning: method possibly missing a [super reshape] call [-Wobjc-missing-super-calls] This is not an issue when running versions compiled on older systems. --- libs/gtkmm2ext/nsglview.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/gtkmm2ext/nsglview.mm') diff --git a/libs/gtkmm2ext/nsglview.mm b/libs/gtkmm2ext/nsglview.mm index 0eb6a1a5ce..1008f5e602 100644 --- a/libs/gtkmm2ext/nsglview.mm +++ b/libs/gtkmm2ext/nsglview.mm @@ -278,6 +278,9 @@ __attribute__ ((visibility ("hidden"))) void* Gtkmm2ext::nsglview_create (Gtkmm2ext::CairoCanvas* canvas) { + if (g_getenv ("ARDOUR_NSGL") && (0 == atoi (g_getenv ("ARDOUR_NSGL")))) { + return 0; + } /* the API is currently only used on intel mac * for big-endian RGBA <> RGBA byte order of the texture * will have to be swapped. -- cgit v1.2.3