[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 +++-
boilerplate/cairo-boilerplate.h | 7 +++++++
2 files changed, 10 insertions(+), 1 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/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 19b2957..9dd7818 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -94,6 +94,13 @@
#endif
+/* There are conflicts between QuickDraw and X11. On MacOS GLX is pretty
+ much broken, so test AGL instead. */
+#if CAIRO_CAN_TEST_GLITZ_AGL_SURFACE
+#undef CAIRO_CAN_TEST_GLITZ_GLX_SURFACE
+#endif
+
+
/* A fake format we use for the flattened ARGB output of the PS and
* PDF surfaces. */
#define CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED ((unsigned int) -1)
--
1.5.5
--------------000909060405040909010702--
More information about the cairo
mailing list