[cairo-commit] 2 commits - boilerplate/cairo-boilerplate-pdf.c boilerplate/cairo-boilerplate-ps.c boilerplate/cairo-boilerplate-svg.c boilerplate/Makefile.win32.features build/configure.ac.features build/Makefile.win32.features build/Makefile.win32.features-h configure.ac perf/cairo-perf-compare-backends.c src/cairo-spans.c src/Makefile.win32.features test/any2ppm.c test/Makefile.am util/Makefile.am

Chris Wilson ickle at kemper.freedesktop.org
Tue Sep 8 11:04:32 PDT 2009


 boilerplate/Makefile.win32.features |    7 +++++++
 boilerplate/cairo-boilerplate-pdf.c |    2 ++
 boilerplate/cairo-boilerplate-ps.c  |    2 ++
 boilerplate/cairo-boilerplate-svg.c |    2 ++
 build/Makefile.win32.features       |    1 +
 build/Makefile.win32.features-h     |    3 +++
 build/configure.ac.features         |    3 ++-
 configure.ac                        |   20 +++++++++++++-------
 perf/cairo-perf-compare-backends.c  |    2 +-
 src/Makefile.win32.features         |    7 +++++++
 src/cairo-spans.c                   |    4 ++--
 test/Makefile.am                    |    2 ++
 test/any2ppm.c                      |    8 ++++++++
 util/Makefile.am                    |    4 ++--
 14 files changed, 54 insertions(+), 13 deletions(-)

New commits:
commit 4b221bd49a0c2c980a63779d905e8eb9b9cfa690
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 8 19:02:04 2009 +0100

    [spans] Correct offsets for trapezoids
    
    Pass on the destination offset from composite_trapezoids() to
    composite_polygon().

diff --git a/src/cairo-spans.c b/src/cairo-spans.c
index 1a51634..af3b85f 100644
--- a/src/cairo-spans.c
+++ b/src/cairo-spans.c
@@ -102,8 +102,8 @@ _cairo_surface_composite_trapezoids_as_polygon (cairo_surface_t	*surface,
 
     rects.src.x = src_x;
     rects.src.y = src_y;
-    rects.dst.x = 0;
-    rects.dst.y = 0;
+    rects.dst.x = dst_x;
+    rects.dst.y = dst_y;
     rects.mask.x = dst_x;
     rects.mask.y = dst_y;
     rects.width  = width;
commit 9389cb78a8ea5b6579d091ab1030ab9f1b13efc2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 8 17:51:33 2009 +0100

    [build] Improve handling of missing test apparatus
    
    Improve detection, reporting and disabling of test backends when we lack
    the required libraries and utilities.

diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index 498d0be..ee45b08 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -354,3 +354,10 @@ ifeq ($(CAIRO_HAS_TRACE),1)
 enabled_cairo_boilerplate_private += $(cairo_boilerplate_trace_private) $(cairo_boilerplate_trace_headers)
 enabled_cairo_boilerplate_sources += $(cairo_boilerplate_trace_sources)
 endif
+
+all_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
+all_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
+ifeq ($(CAIRO_HAS_INTERPRETER),1)
+enabled_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
+enabled_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
+endif
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c
index 591e16f..191eb1b 100644
--- a/boilerplate/cairo-boilerplate-pdf.c
+++ b/boilerplate/cairo-boilerplate-pdf.c
@@ -225,6 +225,7 @@ _cairo_boilerplate_pdf_force_fallbacks (cairo_surface_t *abstract_surface,
 }
 
 static const cairo_boilerplate_target_t targets[] = {
+#if CAIRO_CAN_TEST_PDF_SURFACE
     {
 	"pdf", "pdf", ".pdf", NULL,
 	CAIRO_SURFACE_TYPE_PDF,
@@ -250,5 +251,6 @@ static const cairo_boilerplate_target_t targets[] = {
 	_cairo_boilerplate_pdf_cleanup,
 	NULL, TRUE, TRUE
     },
+#endif
 };
 CAIRO_BOILERPLATE (pdf, targets)
diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c
index 53fecd6..899a321 100644
--- a/boilerplate/cairo-boilerplate-ps.c
+++ b/boilerplate/cairo-boilerplate-ps.c
@@ -290,6 +290,7 @@ _cairo_boilerplate_ps_force_fallbacks (cairo_surface_t *abstract_surface,
 }
 
 static const cairo_boilerplate_target_t targets[] = {
+#if CAIRO_CAN_TEST_PS_SURFACE
     {
 	"ps2", "ps", ".ps", NULL,
 	CAIRO_SURFACE_TYPE_PS,
@@ -340,5 +341,6 @@ static const cairo_boilerplate_target_t targets[] = {
 	_cairo_boilerplate_ps_cleanup,
 	NULL, TRUE, TRUE
     },
+#endif
 };
 CAIRO_BOILERPLATE (ps, targets)
diff --git a/boilerplate/cairo-boilerplate-svg.c b/boilerplate/cairo-boilerplate-svg.c
index a8a4d8b..316e33d 100644
--- a/boilerplate/cairo-boilerplate-svg.c
+++ b/boilerplate/cairo-boilerplate-svg.c
@@ -266,6 +266,7 @@ _cairo_boilerplate_svg_force_fallbacks (cairo_surface_t *abstract_surface,
 }
 
 static const cairo_boilerplate_target_t targets[] = {
+#if CAIRO_CAN_TEST_SVG_SURFACE
     /* It seems we should be able to round-trip SVG content perfectly
      * through librsvg and cairo, but for some mysterious reason, some
      * systems get an error of 1 for some pixels on some of the text
@@ -319,5 +320,6 @@ static const cairo_boilerplate_target_t targets[] = {
 	_cairo_boilerplate_svg_cleanup,
 	NULL, TRUE, TRUE
     },
+#endif
 };
 CAIRO_BOILERPLATE (svg, targets)
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index eb10b23..af88c95 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -31,3 +31,4 @@ CAIRO_HAS_SVG_SURFACE=1
 CAIRO_HAS_TEST_SURFACES=0
 CAIRO_HAS_XML_SURFACE=1
 CAIRO_HAS_TRACE=1
+CAIRO_HAS_INTERPRETER=1
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index 552a2d0..1807aee 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -102,4 +102,7 @@ endif
 ifeq ($(CAIRO_HAS_TRACE),1)
 	@echo "#define CAIRO_HAS_TRACE 1" >> src/cairo-features.h
 endif
+ifeq ($(CAIRO_HAS_INTERPRETER),1)
+	@echo "#define CAIRO_HAS_INTERPRETER 1" >> src/cairo-features.h
+endif
 	@echo "#endif" >>  src/cairo-features.h
diff --git a/build/configure.ac.features b/build/configure.ac.features
index 2606850..afa576a 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -394,7 +394,8 @@ AC_DEFUN([CAIRO_REPORT],
 	echo "  Eagle functions: $use_eagle"
 	echo ""
 	echo "The following features and utilies:"
-	echo "  cairo-trace:   $use_trace"
+	echo "  cairo-trace:                $use_trace"
+	echo "  cairo-script-interpreter:   $use_interpreter"
 	echo ""
 	echo "And the following internal features:"
 	echo "  gtk-doc:       $enable_gtk_doc"
diff --git a/configure.ac b/configure.ac
index c4b38d8..985ea71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -504,7 +504,7 @@ if test "x$use_ps" = "xyes"; then
   libspectre_DEPENDENCY="libspectre >= $SPECTRE_VERSION_REQUIRED"
   PKG_CHECK_MODULES(LIBSPECTRE, $libspectre_DEPENDENCY,
 		    [any2ppm_ps=yes],
-		    [AC_MSG_RESULT(no)])
+		    [test_ps="no (requires libspectre)"])
 fi
 
 AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes")
@@ -535,8 +535,8 @@ if test "x$use_pdf" = "xyes"; then
   PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY,
 		    [CAIRO_CHECK_FUNCS_WITH_FLAGS(poppler_page_render, [$POPPLER_CFLAGS], [$POPPLER_LIBS],
                     [test_pdf=yes; any2ppm_pdf=yes],
-		    [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])],
-		    [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])
+		    [test_pdf="no (requires $poppler_DEPENDENCY)"])],
+		    [test_pdf="no (requires $poppler_DEPENDENCY)"])
   if test "x$test_pdf" = "xyes"; then
     AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)])
   else
@@ -566,8 +566,8 @@ if test "x$use_svg" = "xyes"; then
   PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0,
 		    [CAIRO_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS],
                     [test_svg=yes; any2ppm_svg=yes],
-		    [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])],
-		    [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])
+		    [test_svg="no (requires $librsvg_DEPENDENCY)"])],
+		    [test_svg="no (requires $librsvg_DEPENDENCY)"])
   if test "x$test_svg" = "xyes"; then
     AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested])
   else
@@ -645,12 +645,18 @@ case $host in
 esac
 
 CAIRO_ENABLE(trace, cairo-trace, yes, [
-	if test "x$have_ld_preload" != "xyes" -o "x$have_libz" != "xyes"; then
+	if test "x$have_ld_preload" != "xyes" -o \
+		"x$have_libz" != "xyes" -o \
+		"x$have_dl" != "xyes"; then
 		use_trace="no (requires dynamic linker and zlib)"
 	fi
 ])
 
-AM_CONDITIONAL(BUILD_SCRIPT, test "x$have_libz" = "xyes")
+CAIRO_ENABLE(interpreter, cairo-script-interpreter, yes, [
+	if test "x$have_libz" != "xyes" "x$have_dl" != "xyes"; then
+		use_interpreter="no (requires zlib)"
+	fi
+])
 
 AC_CHECK_LIB(bfd, bfd_openr,
 	 [AC_CHECK_HEADER(bfd.h, [have_bfd=yes],
diff --git a/perf/cairo-perf-compare-backends.c b/perf/cairo-perf-compare-backends.c
index 1f737eb..1448169 100644
--- a/perf/cairo-perf-compare-backends.c
+++ b/perf/cairo-perf-compare-backends.c
@@ -263,7 +263,7 @@ cairo_perf_reports_compare (cairo_perf_report_t		*reports,
 	diff = &diffs[i];
 
 	/* Discard as uninteresting a change which is less than the
-	 * minimum change required, (default may be overriden on
+	 * minimum change required, (default may be overridden on
 	 * command-line). */
 	if (fabs (diff->change) - 1.0 < options->min_change)
 	    continue;
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index 5164096..b1c81c3 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -472,3 +472,10 @@ ifeq ($(CAIRO_HAS_TRACE),1)
 enabled_cairo_private += $(cairo_trace_private) $(cairo_trace_headers)
 enabled_cairo_sources += $(cairo_trace_sources)
 endif
+
+all_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
+all_cairo_sources += $(cairo_interpreter_sources)
+ifeq ($(CAIRO_HAS_INTERPRETER),1)
+enabled_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
+enabled_cairo_sources += $(cairo_interpreter_sources)
+endif
diff --git a/test/Makefile.am b/test/Makefile.am
index fafeb43..d6bcb27 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -54,6 +54,7 @@ test_sources += $(multi_page_surface_test_sources)
 endif
 
 # Include fallback-resolution (once!) if we have any of the vector surfaces
+if BUILD_ANY2PPM
 if CAIRO_HAS_SVG_SURFACE
 test = $(fallback_resolution_test_sources)
 endif
@@ -63,6 +64,7 @@ endif
 if CAIRO_HAS_PS_SURFACE
 test = $(fallback_resolution_test_sources)
 endif
+endif
 test_sources += $(test)
 
 TESTS += cairo-test-suite$(EXEEXT)
diff --git a/test/any2ppm.c b/test/any2ppm.c
index f35891f..c93e457 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -257,6 +257,7 @@ _create_image (void *closure,
     return cairo_surface_reference (*out);
 }
 
+#if CAIRO_HAS_INTERPRETER
 static const char *
 _cairo_script_render_page (const char *filename,
 			   cairo_surface_t **surface_out)
@@ -303,6 +304,13 @@ cs_convert (char **argv, int fd)
 
     return err;
 }
+#else
+static const char *
+cs_convert (char **argv, int fd)
+{
+    return "compiled without CairoScript support.";
+}
+#endif
 
 #if CAIRO_CAN_TEST_PDF_SURFACE
 /* adapted from pdf2png.c */
diff --git a/util/Makefile.am b/util/Makefile.am
index 6ee0ba9..4394fe3 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/build/Makefile.am.common
 
 SUBDIRS = .
 
-if BUILD_SCRIPT
+if CAIRO_HAS_INTERPRETER
 SUBDIRS += cairo-script
 endif
 
@@ -25,7 +25,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
 	      $(CAIRO_CFLAGS)
 
 EXTRA_PROGRAMS += show-traps show-edges show-events
-if BUILD_SCRIPT
+if CAIRO_HAS_INTERPRETER
 EXTRA_PROGRAMS += trace-to-xml xml-to-trace
 endif
 


More information about the cairo-commit mailing list