[cairo-commit] test/fallback-resolution.c

Bryce Harrington bryce at kemper.freedesktop.org
Thu Aug 14 12:02:02 PDT 2014


 test/fallback-resolution.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 7d44f8d47e7c4389cf6a3baefc7fee7b5dffbb21
Author: Ravi Nanjundappa <nravi.n at samsung.com>
Date:   Tue Aug 12 14:16:46 2014 +0530

    test : build fix when --enable-pdf=no
    
    Though --enable-pdf=yes by default, when --enable-pdf=no, the cairo build
    fails due to unavailability of cairo-pdf.h and related cairo pdf's apis.
    The current changes fixes this issue by conditionally checking if PDF
    surface is enabled or not.
    
    Signed-off-by: Ravi Nanjundappa <nravi.n at samsung.com>
    Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
    Tested-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c
index df53e62..306a570 100644
--- a/test/fallback-resolution.c
+++ b/test/fallback-resolution.c
@@ -32,7 +32,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <cairo.h>
+
+#if CAIRO_HAS_PDF_SURFACE
 #include <cairo-pdf.h>
+#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -280,9 +283,11 @@ generate_reference (double ppi_x, double ppi_y, const char *filename)
 
 	options = cairo_font_options_create ();
 
+#if CAIRO_HAS_PDF_SURFACE
 	pdf = cairo_pdf_surface_create ("tmp.pdf", 1, 1);
 	cairo_surface_get_font_options (pdf, options);
 	cairo_surface_destroy (pdf);
+#endif
 
 	cairo_set_font_options (cr, options);
 	cairo_font_options_destroy (options);


More information about the cairo-commit mailing list