From 65693a3be3229625a84dd94a9490c5ed9fc5bcf0 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 8 Mar 2017 11:14:59 +0100 Subject: make cairo-gl a compile time option --- fbpdf.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'fbpdf.c') diff --git a/fbpdf.c b/fbpdf.c index e24c54b..9b4e665 100644 --- a/fbpdf.c +++ b/fbpdf.c @@ -34,7 +34,9 @@ #include #include -#include +#ifdef HAVE_CAIRO_GL +# include +#endif #include "vt.h" #include "kbd.h" @@ -154,7 +156,9 @@ static void page_render(void) cairo_destroy(context); if (surfacegl) { +#ifdef HAVE_CAIRO_GL cairo_gl_surface_swapbuffers(surfacegl); +#endif } if (gfx->flush_display) gfx->flush_display(second); @@ -302,7 +306,11 @@ int main(int argc, char *argv[]) output = cfg_get_str(O_OUTPUT); mode = cfg_get_str(O_VIDEO_MODE); fitwidth = GET_FIT_WIDTH(); +#ifdef HAVE_CAIRO_GL opengl = GET_OPENGL(); +#else + opengl = 0; +#endif pageflip = GET_PAGEFLIP(); if (device) { @@ -361,11 +369,15 @@ int main(int argc, char *argv[]) gfx->stride); } } else { +#ifdef HAVE_CAIRO_GL cairo_device_t *dev; dev = cairo_egl_device_create(gfx->dpy, gfx->ctx); surfacegl = cairo_gl_surface_create_for_egl(dev, gfx->surface, gfx->hdisplay, gfx->vdisplay); +#else + exit(1); +#endif } tty_raw(); -- cgit