Ardour-specific patch for cairo 1.16.0: FORCE_BUGGY_GRADIENTS environment variable.

Allows users to force software gradient rendering on Linux systems with buggy
GPU drivers (notably older NVIDIA) by setting FORCE_BUGGY_GRADIENTS=1.

Origin: Ardour git commit 990fd441d9 (2.0-ongoing branch, 2012-05-22)
        plus header macro addition for Ardour's #ifdef guard.
Reference: https://ardour.org/current_dependencies.html
           "patched to allow users to disable h/w gradient rendering
            on buggy Linux video drivers"

--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -266,7 +266,12 @@
 #if RENDER_MAJOR == 0 && RENDER_MINOR < 10
     display->buggy_gradients = TRUE;
 #else
-    display->buggy_gradients = FALSE;
+    if (getenv ("FORCE_BUGGY_GRADIENTS")) {
+        display->buggy_gradients = TRUE;
+    }
+    else {
+        display->buggy_gradients = FALSE;
+    }
 #endif
     display->buggy_pad_reflect = FALSE;
     display->buggy_repeat = FALSE;
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -3179,4 +3179,6 @@

 CAIRO_END_DECLS

+#define CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
+
 #endif /* CAIRO_H */
