From 1953676e64972c17f7066ff377291f4cb4f47757 Mon Sep 17 00:00:00 2001 From: suyambulingamrm Date: Fri, 6 Jun 2014 20:19:02 +0530 Subject: Issue #77. Add ENABLE_CAIRO option to make compilation against Cairo optional. --- src/caskbench_context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/caskbench_context.cpp') diff --git a/src/caskbench_context.cpp b/src/caskbench_context.cpp index a80fe7b..979a79d 100644 --- a/src/caskbench_context.cpp +++ b/src/caskbench_context.cpp @@ -9,11 +9,14 @@ #include #include +#include +#ifdef USE_CAIRO #include #ifdef HAVE_CAIRO_GL_H # include #endif +#endif #ifdef USE_SKIA # include @@ -45,6 +48,7 @@ context_init(caskbench_context_t *context, int size) context->tolerance = 0.25; } +#ifdef USE_CAIRO void context_setup_cairo(caskbench_context_t *context, const device_config_t& config) { @@ -90,6 +94,7 @@ context_setup_cairo(caskbench_context_t *context, const device_config_t& config) // Ease up Cairo's tessellation tolerance (default is 0.001) cairo_set_tolerance (context->cairo_cr, context->tolerance); } +#endif void context_update_cairo(caskbench_context_t *context) @@ -102,8 +107,10 @@ context_destroy_cairo(caskbench_context_t *context) { if (!context) return; +#ifdef USE_CAIRO cairo_destroy(context->cairo_cr); cairo_surface_destroy(context->cairo_surface); +#endif context->destroy_cairo(); context->cairo_cr = NULL; } -- cgit v1.3.1-4-g156e