[cairo-commit] 4 commits - src/cairo-botor-scan-converter.c src/cairo-ft-font.c src/cairo-svg-surface.c test/any2ppm.c test/svg2png.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Mon Oct 16 09:56:36 UTC 2017


 src/cairo-botor-scan-converter.c |    2 ++
 src/cairo-ft-font.c              |   18 +++++++++++-------
 src/cairo-svg-surface.c          |    2 +-
 test/any2ppm.c                   |    2 +-
 test/svg2png.c                   |    2 --
 5 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit 132794f6832ea83e2f9a72e11b05080d2cdf80f8
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 16 20:13:48 2017 +1030

    svg: recording_surface is needed even if not emitted

diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index e7e04791..29bdd8c0 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1645,8 +1645,8 @@ _cairo_svg_surface_emit_composite_recording_pattern (cairo_output_stream_t	*outp
     if (unlikely (status))
 	return status;
 
+    recording_surface = to_recording_surface (pattern);
     if (is_new) {
-	recording_surface = to_recording_surface (pattern);
 	status = _cairo_svg_surface_emit_recording_surface (document, recording_surface, source_id);
 	if (unlikely (status))
 	    return status;
commit 27990e391070dd43f08450a3d54c90d18e6d85f3
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 16 19:47:21 2017 +1030

    fix unused function warnings

diff --git a/src/cairo-botor-scan-converter.c b/src/cairo-botor-scan-converter.c
index 64883a6f..438f96bb 100644
--- a/src/cairo-botor-scan-converter.c
+++ b/src/cairo-botor-scan-converter.c
@@ -2128,6 +2128,7 @@ botor_add_edge (cairo_botor_scan_converter_t *self,
     return CAIRO_STATUS_SUCCESS;
 }
 
+#if 0
 static cairo_status_t
 _cairo_botor_scan_converter_add_edge (void		*converter,
 				      const cairo_point_t *p1,
@@ -2146,6 +2147,7 @@ _cairo_botor_scan_converter_add_edge (void		*converter,
 
     return botor_add_edge (self, &edge);
 }
+#endif
 
 cairo_status_t
 _cairo_botor_scan_converter_add_polygon (cairo_botor_scan_converter_t *converter,
diff --git a/test/any2ppm.c b/test/any2ppm.c
index b60b4d95..a92412d0 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -244,6 +244,7 @@ write_ppm (cairo_surface_t *surface, int fd)
     return NULL;
 }
 
+#if CAIRO_HAS_INTERPRETER
 static cairo_surface_t *
 _create_image (void *closure,
 	       cairo_content_t content,
@@ -268,7 +269,6 @@ _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)
commit fc929d70054583d0c21f24b18083348e3e7d914c
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Oct 16 19:42:16 2017 +1030

    ft: prevent unused var warning when freetype < 2.8

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 3a4663d9..7f23eb78 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -2658,7 +2658,7 @@ _cairo_ft_is_synthetic (void	        *abstract_font,
     if (face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
 	FT_MM_Var *mm_var = NULL;
 	FT_Fixed *coords = NULL;
-	int num_axis, i;
+	int num_axis;
 
 	/* If this is an MM or variable font we can't assume the current outlines
 	 * are the same as the font tables */
@@ -2682,12 +2682,16 @@ _cairo_ft_is_synthetic (void	        *abstract_font,
 	 * current design coordinates are the default coordinates. In this case
 	 * the current outlines match the font tables.
 	 */
-	FT_Get_Var_Design_Coordinates (face, num_axis, coords);
-	*is_synthetic = FALSE;
-	for (i = 0; i < num_axis; i++) {
-	    if (coords[i] != mm_var->axis[i].def) {
-		*is_synthetic = TRUE;
-		break;
+	{
+	    int i;
+
+	    FT_Get_Var_Design_Coordinates (face, num_axis, coords);
+	    *is_synthetic = FALSE;
+	    for (i = 0; i < num_axis; i++) {
+		if (coords[i] != mm_var->axis[i].def) {
+		    *is_synthetic = TRUE;
+		    break;
+		}
 	    }
 	}
 #endif
commit 1d58e0f81856038d8aa306b97302485a4d2e2ec9
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Oct 15 19:42:08 2017 +1030

    svg2png: remove unused headers

diff --git a/test/svg2png.c b/test/svg2png.c
index 9a5c8c04..24bdbfa9 100644
--- a/test/svg2png.c
+++ b/test/svg2png.c
@@ -27,8 +27,6 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <gdk/gdk.h>
-#include <gdk/gdkpixbuf.h>
 #include <librsvg/rsvg.h>
 
 #define FAIL(msg)							\


More information about the cairo-commit mailing list