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.
This commit is contained in:
Robin Gareus 2020-03-24 14:24:14 +01:00
parent 0f63b82943
commit 2f0914c730
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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.