aboutsummaryrefslogtreecommitdiffstats
path: root/fbpdf.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-03-08 11:14:59 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-03-08 11:14:59 +0100
commit65693a3be3229625a84dd94a9490c5ed9fc5bcf0 (patch)
tree6b7755f7f5c2dd65ac441916bb13908ac8af8c8d /fbpdf.c
parentd3d48f198ee71b4421d9fe7b2c66341db9ef2eff (diff)
downloadfbida-65693a3be3229625a84dd94a9490c5ed9fc5bcf0.tar.gz
make cairo-gl a compile time option
Diffstat (limited to 'fbpdf.c')
-rw-r--r--fbpdf.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fbpdf.c b/fbpdf.c
index e24c54b..9b4e665 100644
--- a/fbpdf.c
+++ b/fbpdf.c
@@ -34,7 +34,9 @@
#include <cairo.h>
#include <epoxy/egl.h>
-#include <cairo-gl.h>
+#ifdef HAVE_CAIRO_GL
+# include <cairo-gl.h>
+#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();