[PATCH] [boilerplate] fix compilation for glitz-agl
Paolo Bonzini
bonzini at gnu.org
Fri Nov 21 07:36:56 PST 2008
This patch fixies the compilation of the cairo-boilerplate-glitz.c file
when the AGL backend is used. Besides fixing pasto errors, there are
conflicts between QuickDraw's Cursor and X11. Given that GLX is not
very well supported on Mac OS X, I opted to use AGL if both are
available and testable.
---
boilerplate/cairo-boilerplate-glitz.c | 4 +++-
configure.ac | 7 +++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/boilerplate/cairo-boilerplate-glitz.c b/boilerplate/cairo-boilerplate-glitz.c
index a764080..c03675a 100644
--- a/boilerplate/cairo-boilerplate-glitz.c
+++ b/boilerplate/cairo-boilerplate-glitz.c
@@ -257,7 +257,7 @@ typedef struct _glitz_agl_target_closure {
glitz_target_closure_base_t base;
} glitz_agl_target_closure_t;
-glitz_surface_t *
+static glitz_surface_t *
_cairo_boilerplate_glitz_agl_create_surface_internal (glitz_format_name_t formatname,
int width,
int height,
@@ -332,6 +332,7 @@ _cairo_boilerplate_glitz_agl_create_surface (const char *name,
glitz_surface_t *glitz_surface;
cairo_surface_t *surface = NULL;
glitz_agl_target_closure_t *aglc;
+ int status;
glitz_agl_init ();
@@ -344,6 +345,7 @@ _cairo_boilerplate_glitz_agl_create_surface (const char *name,
case CAIRO_CONTENT_COLOR_ALPHA:
glitz_surface = _cairo_boilerplate_glitz_agl_create_surface_internal (GLITZ_STANDARD_ARGB32, width, height, NULL);
break;
+ case CAIRO_CONTENT_ALPHA:
default:
CAIRO_BOILERPLATE_LOG ("Invalid content for glitz-agl test: %d\n", content);
goto FAIL;
diff --git a/configure.ac b/configure.ac
index 7384ccc..8b495a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,10 @@ if test "x$use_glitz" = "xyes";then
if test "x$have_glitz_egl" = "xyes";then
AC_DEFINE(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, 1, [define if glitz backend can be tested against egl])
fi
- if test "x$have_glitz_glx" = "xyes";then
+
+ dnl There are conflicts between QuickDraw and X11. Furthermore, on MacOS
+ dnl GLX is pretty much broken, so test AGL instead.
+ if test "x$have_glitz_glx" = "xyes" && test "x$have_glitz_agl" = "xno";then
AC_DEFINE(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, 1, [define if glitz backend can be tested against glx])
fi
if test "x$have_glitz_wgl" = "xyes";then
@@ -223,7 +226,7 @@ fi
AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_AGL_SURFACE, test "x$have_glitz_agl" = "xyes")
AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, test "x$have_glitz_egl" = "xyes")
-AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, test "x$have_glitz_glx" = "xyes")
+AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, test "x$have_glitz_glx" = "xyes" && test "x$have_glitz_agl" = "xno")
AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, test "x$have_glitz_wgl" = "xyes")
dnl ===========================================================================
--
1.5.5
--------------070403050909090601020209--
More information about the cairo
mailing list