]> Pileus Git - ~andy/gtk/commitdiff
build: Add an enable flag to allow enabling Cairo GL backend
authorRob Bradford <rob@linux.intel.com>
Mon, 16 Apr 2012 14:29:44 +0000 (15:29 +0100)
committerRob Bradford <rob@linux.intel.com>
Mon, 16 Apr 2012 15:05:51 +0000 (16:05 +0100)
This change adds --enable-wayland-cairo-gl which turns on the define used in
the Wayland backend to determine whether to use EGL surfaces with Cairo GL or
whether to use the Cairo image backend with an SHM surface (the default).

Part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=672361

configure.ac

index 8e1d691ef6242ebc5e1761c345932135bac481a8..3cbfa036d6065dbb5b4c5821c88f7e6d51eb92af 100644 (file)
@@ -316,6 +316,12 @@ AC_ARG_ENABLE(quartz-relocation,
                               [enable bundle-based relocation functions])],
                               [quartz_relocation=yes])
 
+AC_ARG_ENABLE(wayland-cairo-gl,
+              AS_HELP_STRING([--enable-wayland-cairo-gl],
+                             [enable the use of Cairo GL in the Wayland backend]),
+              [enable_wayland_cairo_gl=yes])
+
+
 cairo_backends=
 backend_immodules=
 have_gio_unix=no
@@ -379,8 +385,14 @@ else
 fi
 
 if test "x$enable_wayland_backend" == "xyes"; then
-  # For the cairo image backend
-  cairo_backends="$cairo_backends cairo"
+  if test "x$enable_wayland_cairo_gl" == "xyes"; then
+    # Wayland can use cairo-gl
+    cairo_backends="$cairo_backends cairo-gl"
+    AC_DEFINE(GDK_WAYLAND_USE_EGL, [1], [Whether to use EGL in Wayland backend])
+  else
+    # For the cairo image backend
+    cairo_backends="$cairo_backends cairo"
+  fi
   GDK_BACKENDS="$GDK_BACKENDS wayland"
   have_gio_unix=yes
   GDK_WINDOWING="$GDK_WINDOWING