[cairo-commit] 7 commits - src/cairo-gl-traps-compositor.c src/cairo-pdf-operators-private.h src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-type1-subset.c src/cairo-type3-glyph-surface-private.h test/README

Chris Wilson ickle at kemper.freedesktop.org
Thu Jun 20 03:15:26 PDT 2013


 src/cairo-gl-traps-compositor.c         |    2 
 src/cairo-pdf-operators-private.h       |    7 
 src/cairo-pdf-surface.c                 |  262 ++++++++++++++++----------------
 src/cairo-ps-surface.c                  |    2 
 src/cairo-type1-subset.c                |   15 -
 src/cairo-type3-glyph-surface-private.h |    5 
 test/README                             |    5 
 7 files changed, 152 insertions(+), 146 deletions(-)

New commits:
commit f39eef852491c10dec4089f9fb3d332a712da28c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jun 20 11:11:20 2013 +0100

    pdf: Fix compiler warning for use of unitialised variable along error path
    
    cairo-pdf-surface.c: In function '_cairo_pdf_surface_add_source_surface.isra.20':
    cairo-pdf-surface.c:1461:10: warning: 'unique_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 71e9554..6580d5b 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1321,7 +1321,7 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t	    *surface,
     cairo_pdf_source_surface_entry_t *surface_entry;
     cairo_int_status_t status;
     cairo_bool_t interpolate;
-    unsigned char *unique_id;
+    unsigned char *unique_id = NULL;
     unsigned long unique_id_length = 0;
     cairo_image_surface_t *image;
     void *image_extra;
commit 80641f4adc3e2ca16e67110e7b82f42e88efd93e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jun 20 11:09:53 2013 +0100

    pdf: Improve consistency in use of cairo_int_status_t
    
    Suppress several compiler warning for mixing
    cairo_status_t/cairo_int_status_t enums.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-pdf-operators-private.h b/src/cairo-pdf-operators-private.h
index 6e1ae18..5d36879 100644
--- a/src/cairo-pdf-operators-private.h
+++ b/src/cairo-pdf-operators-private.h
@@ -53,9 +53,10 @@
  */
 #define PDF_GLYPH_BUFFER_SIZE 200
 
-typedef cairo_status_t (*cairo_pdf_operators_use_font_subset_t) (unsigned int  font_id,
-								 unsigned int  subset_id,
-								 void         *closure);
+typedef cairo_int_status_t
+(*cairo_pdf_operators_use_font_subset_t) (unsigned int  font_id,
+					  unsigned int  subset_id,
+					  void         *closure);
 
 typedef struct _cairo_pdf_glyph {
     unsigned int glyph_index;
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index a9c1207..71e9554 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -198,7 +198,7 @@ _cairo_pdf_surface_clear (cairo_pdf_surface_t *surface);
 static void
 _cairo_pdf_smask_group_destroy (cairo_pdf_smask_group_t *group);
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_font (unsigned int        font_id,
 			     unsigned int        subset_id,
 			     void		*closure);
@@ -206,16 +206,16 @@ _cairo_pdf_surface_add_font (unsigned int        font_id,
 static void
 _cairo_pdf_group_resources_init (cairo_pdf_group_resources_t *res);
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_open_stream (cairo_pdf_surface_t	*surface,
 				cairo_pdf_resource_t    *resource,
                                 cairo_bool_t             compressed,
 				const char		*fmt,
 				...) CAIRO_PRINTF_FORMAT(4, 5);
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_close_stream (cairo_pdf_surface_t	*surface);
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface);
 
 static void
@@ -230,10 +230,10 @@ _cairo_pdf_surface_write_catalog (cairo_pdf_surface_t *surface);
 static long
 _cairo_pdf_surface_write_xref (cairo_pdf_surface_t *surface);
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface);
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_font_subsets (cairo_pdf_surface_t *surface);
 
 static cairo_bool_t
@@ -246,7 +246,7 @@ static cairo_pdf_resource_t
 _cairo_pdf_surface_new_object (cairo_pdf_surface_t *surface)
 {
     cairo_pdf_resource_t resource;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_object_t object;
 
     object.offset = _cairo_output_stream_get_position (surface->output);
@@ -766,14 +766,14 @@ _cairo_pdf_surface_add_operator (cairo_pdf_surface_t *surface,
     res->operators[op] = TRUE;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_alpha (cairo_pdf_surface_t *surface,
 			      double               alpha,
 			      int                 *index)
 {
     int num_alphas, i;
     double other;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_group_resources_t *res = &surface->resources;
 
     num_alphas = _cairo_array_num_elements (&res->alphas);
@@ -794,21 +794,21 @@ _cairo_pdf_surface_add_alpha (cairo_pdf_surface_t *surface,
     return CAIRO_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_smask (cairo_pdf_surface_t  *surface,
 			      cairo_pdf_resource_t  smask)
 {
     return _cairo_array_append (&(surface->resources.smasks), &smask);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_pattern (cairo_pdf_surface_t  *surface,
 				cairo_pdf_resource_t  pattern)
 {
     return _cairo_array_append (&(surface->resources.patterns), &pattern);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_shading (cairo_pdf_surface_t  *surface,
 				cairo_pdf_resource_t  shading)
 {
@@ -816,14 +816,14 @@ _cairo_pdf_surface_add_shading (cairo_pdf_surface_t  *surface,
 }
 
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_xobject (cairo_pdf_surface_t  *surface,
 				cairo_pdf_resource_t  xobject)
 {
     return _cairo_array_append (&(surface->resources.xobjects), &xobject);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_font (unsigned int        font_id,
 			     unsigned int        subset_id,
 			     void		*closure)
@@ -831,7 +831,7 @@ _cairo_pdf_surface_add_font (unsigned int        font_id,
     cairo_pdf_surface_t *surface = closure;
     cairo_pdf_font_t font;
     int num_fonts, i;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_group_resources_t *res = &surface->resources;
 
     num_fonts = _cairo_array_num_elements (&res->fonts);
@@ -1080,7 +1080,7 @@ _cairo_pdf_smask_group_destroy (cairo_pdf_smask_group_t *group)
     free (group);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_smask_group (cairo_pdf_surface_t     *surface,
 				    cairo_pdf_smask_group_t *group)
 {
@@ -1302,7 +1302,7 @@ _get_source_surface_size (cairo_surface_t         *source,
  * Only one of @source_pattern or @source_surface is to be
  * specified. Set the other to NULL.
  **/
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t	    *surface,
 				       cairo_surface_t	            *source_surface,
 				       const cairo_pattern_t	    *source_pattern,
@@ -1319,7 +1319,7 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t	    *surface,
     cairo_pdf_source_surface_t src_surface;
     cairo_pdf_source_surface_entry_t surface_key;
     cairo_pdf_source_surface_entry_t *surface_entry;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_bool_t interpolate;
     unsigned char *unique_id;
     unsigned long unique_id_length = 0;
@@ -1463,7 +1463,7 @@ fail1:
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t	   *surface,
 					       const cairo_pattern_t	   *pattern,
 					       const cairo_rectangle_int_t *extents,
@@ -1472,7 +1472,7 @@ _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t	   *surface,
 					       cairo_pdf_resource_t	   *gstate_res)
 {
     cairo_pdf_pattern_t pdf_pattern;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     pdf_pattern.is_shading = is_shading;
 
@@ -1480,7 +1480,7 @@ _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t	   *surface,
     if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) {
 	pattern_res->id = 0;
 	gstate_res->id = 0;
-	return CAIRO_STATUS_SUCCESS;
+	return CAIRO_INT_STATUS_SUCCESS;
     }
 
     status = _cairo_pattern_create_copy (&pdf_pattern.pattern, pattern);
@@ -1532,7 +1532,7 @@ _cairo_pdf_surface_add_pdf_pattern_or_shading (cairo_pdf_surface_t	   *surface,
 	return status;
     }
 
-    return CAIRO_STATUS_SUCCESS;
+    return CAIRO_INT_STATUS_SUCCESS;
 }
 
 /* Get BBox in PDF coordinates from extents in cairo coordinates */
@@ -1547,7 +1547,7 @@ _get_bbox_from_extents (double                       surface_height,
     bbox->p2.y = surface_height - extents->y;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_pdf_shading (cairo_pdf_surface_t		*surface,
 				    const cairo_pattern_t	*pattern,
 				    const cairo_rectangle_int_t	*extents,
@@ -1562,7 +1562,7 @@ _cairo_pdf_surface_add_pdf_shading (cairo_pdf_surface_t		*surface,
 							  gstate_res);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t		*surface,
 				    const cairo_pattern_t	*pattern,
 				    const cairo_rectangle_int_t	*extents,
@@ -1577,7 +1577,7 @@ _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t		*surface,
 							  gstate_res);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_open_stream (cairo_pdf_surface_t	*surface,
 				cairo_pdf_resource_t    *resource,
 				cairo_bool_t             compressed,
@@ -1646,22 +1646,22 @@ _cairo_pdf_surface_open_stream (cairo_pdf_surface_t	*surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     long length;
 
     if (! surface->pdf_stream.active)
-	return CAIRO_STATUS_SUCCESS;
+	return CAIRO_INT_STATUS_SUCCESS;
 
     status = _cairo_pdf_operators_flush (&surface->pdf_operators);
 
     if (surface->pdf_stream.compressed) {
-	cairo_status_t status2;
+	cairo_int_status_t status2;
 
 	status2 = _cairo_output_stream_destroy (surface->output);
-	if (likely (status == CAIRO_STATUS_SUCCESS))
+	if (likely (status == CAIRO_INT_STATUS_SUCCESS))
 	    status = status2;
 
 	surface->output = surface->pdf_stream.old_output;
@@ -1687,7 +1687,7 @@ _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface)
 
     surface->pdf_stream.active = FALSE;
 
-    if (likely (status == CAIRO_STATUS_SUCCESS))
+    if (likely (status == CAIRO_INT_STATUS_SUCCESS))
 	status = _cairo_output_stream_get_status (surface->output);
 
     return status;
@@ -1742,12 +1742,12 @@ _cairo_pdf_surface_write_memory_stream (cairo_pdf_surface_t         *surface,
 				 "endobj\n");
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_open_group (cairo_pdf_surface_t         *surface,
 			       const cairo_box_double_t    *bbox,
 			       cairo_pdf_resource_t        *resource)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     assert (surface->pdf_stream.active == FALSE);
     assert (surface->group_stream.active == FALSE);
@@ -1785,11 +1785,11 @@ _cairo_pdf_surface_open_group (cairo_pdf_surface_t         *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_open_knockout_group (cairo_pdf_surface_t         *surface,
 					const cairo_box_double_t    *bbox)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     status = _cairo_pdf_surface_open_group (surface, bbox, NULL);
     if (unlikely (status))
@@ -1797,14 +1797,14 @@ _cairo_pdf_surface_open_knockout_group (cairo_pdf_surface_t         *surface,
 
     surface->group_stream.is_knockout = TRUE;
 
-    return CAIRO_STATUS_SUCCESS;
+    return CAIRO_INT_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_close_group (cairo_pdf_surface_t *surface,
 				cairo_pdf_resource_t *group)
 {
-    cairo_status_t status = CAIRO_STATUS_SUCCESS, status2;
+    cairo_int_status_t status = CAIRO_INT_STATUS_SUCCESS, status2;
 
     assert (surface->pdf_stream.active == FALSE);
     assert (surface->group_stream.active == TRUE);
@@ -1833,7 +1833,7 @@ _cairo_pdf_surface_close_group (cairo_pdf_surface_t *surface,
 	*group = surface->group_stream.resource;
 
     status2 = _cairo_output_stream_destroy (surface->group_stream.mem_stream);
-    if (status == CAIRO_STATUS_SUCCESS)
+    if (status == CAIRO_INT_STATUS_SUCCESS)
 	status = status2;
 
     surface->group_stream.mem_stream = NULL;
@@ -1842,13 +1842,13 @@ _cairo_pdf_surface_close_group (cairo_pdf_surface_t *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_open_content_stream (cairo_pdf_surface_t       *surface,
 					const cairo_box_double_t  *bbox,
 					cairo_pdf_resource_t      *resource,
 					cairo_bool_t               is_form)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     assert (surface->pdf_stream.active == FALSE);
     assert (surface->group_stream.active == FALSE);
@@ -1896,10 +1896,10 @@ _cairo_pdf_surface_open_content_stream (cairo_pdf_surface_t       *surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_close_content_stream (cairo_pdf_surface_t *surface)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     assert (surface->pdf_stream.active == TRUE);
     assert (surface->group_stream.active == FALSE);
@@ -2070,7 +2070,7 @@ static cairo_int_status_t
 _cairo_pdf_surface_has_fallback_images (void		*abstract_surface,
 					cairo_bool_t	 has_fallbacks)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_surface_t *surface = abstract_surface;
     cairo_box_double_t bbox;
 
@@ -2092,7 +2092,7 @@ _cairo_pdf_surface_supports_fine_grained_fallbacks (void *abstract_surface)
     return TRUE;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_add_padded_image_surface (cairo_pdf_surface_t          *surface,
 					     const cairo_pattern_t        *source,
 					     const cairo_rectangle_int_t  *extents,
@@ -2197,14 +2197,14 @@ BAIL:
  * resource to use. When stencil_mask is FALSE, a new resource will be
  * created and returned in stream_res.
  */
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t	*surface,
 			       cairo_image_surface_t	*image,
 			       cairo_bool_t              stencil_mask,
 			       const char               *interpolate,
 			       cairo_pdf_resource_t	*stream_res)
 {
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
     char *alpha;
     unsigned long alpha_size;
     uint32_t *pixel32;
@@ -2326,14 +2326,14 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t	*surface,
 
 /* Emit image data into the given surface, providing a resource that
  * can be used to reference the data in image_ret. */
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_image (cairo_pdf_surface_t     *surface,
                                cairo_image_surface_t   *image_surf,
                                cairo_pdf_resource_t    *image_res,
 			       cairo_filter_t           filter,
 			       cairo_bool_t             stencil_mask)
 {
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
     char *data;
     unsigned long data_size;
     uint32_t *pixel;
@@ -2533,7 +2533,7 @@ _cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t   *surface,
 				   cairo_surface_t	 *source,
 				   cairo_pdf_resource_t   res)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     const unsigned char *mime_data;
     unsigned long mime_data_length;
     cairo_image_info_t info;
@@ -2574,7 +2574,7 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t   *surface,
 				    cairo_surface_t	  *source,
 				    cairo_pdf_resource_t   res)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     const unsigned char *mime_data;
     unsigned long mime_data_length;
     cairo_image_info_t info;
@@ -2628,7 +2628,7 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t   *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_image_surface (cairo_pdf_surface_t        *surface,
 				       cairo_pdf_source_surface_t *source)
 {
@@ -2670,7 +2670,7 @@ release_source:
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_recording_surface (cairo_pdf_surface_t        *surface,
 					   cairo_pdf_source_surface_t *pdf_source)
 {
@@ -2759,7 +2759,7 @@ err:
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_surface (cairo_pdf_surface_t        *surface,
 				 cairo_pdf_source_surface_t *src_surface)
 {
@@ -2770,12 +2770,12 @@ _cairo_pdf_surface_emit_surface (cairo_pdf_surface_t        *surface,
     return _cairo_pdf_surface_emit_image_surface (surface, src_surface);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t	*surface,
 					 cairo_pdf_pattern_t	*pdf_pattern)
 {
     cairo_pattern_t *pattern = pdf_pattern->pattern;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_resource_t pattern_resource = {0};
     cairo_matrix_t cairo_p2d, pdf_p2d;
     cairo_extend_t extend = cairo_pattern_get_extend (pattern);
@@ -2898,7 +2898,7 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t	*surface,
     cairo_p2d = pattern->matrix;
     status = cairo_matrix_invert (&cairo_p2d);
     /* cairo_pattern_set_matrix ensures the matrix is invertible */
-    assert (status == CAIRO_STATUS_SUCCESS);
+    assert (status == CAIRO_INT_STATUS_SUCCESS);
 
     cairo_matrix_multiply (&pdf_p2d, &cairo_p2d, &surface->cairo_to_pdf);
     cairo_matrix_translate (&pdf_p2d, -x_offset, -y_offset);
@@ -2976,7 +2976,7 @@ typedef struct _cairo_pdf_color_stop {
     cairo_pdf_resource_t resource;
 } cairo_pdf_color_stop_t;
 
-static cairo_status_t
+static cairo_int_status_t
 cairo_pdf_surface_emit_rgb_linear_function (cairo_pdf_surface_t    *surface,
                                             cairo_pdf_color_stop_t *stop1,
                                             cairo_pdf_color_stop_t *stop2,
@@ -2985,7 +2985,7 @@ cairo_pdf_surface_emit_rgb_linear_function (cairo_pdf_surface_t    *surface,
     int num_elems, i;
     cairo_pdf_rgb_linear_function_t elem;
     cairo_pdf_resource_t res;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     num_elems = _cairo_array_num_elements (&surface->rgb_linear_functions);
     for (i = 0; i < num_elems; i++) {
@@ -3029,7 +3029,7 @@ cairo_pdf_surface_emit_rgb_linear_function (cairo_pdf_surface_t    *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 cairo_pdf_surface_emit_alpha_linear_function (cairo_pdf_surface_t    *surface,
                                               cairo_pdf_color_stop_t *stop1,
                                               cairo_pdf_color_stop_t *stop2,
@@ -3038,7 +3038,7 @@ cairo_pdf_surface_emit_alpha_linear_function (cairo_pdf_surface_t    *surface,
     int num_elems, i;
     cairo_pdf_alpha_linear_function_t elem;
     cairo_pdf_resource_t res;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     num_elems = _cairo_array_num_elements (&surface->alpha_linear_functions);
     for (i = 0; i < num_elems; i++) {
@@ -3078,7 +3078,7 @@ cairo_pdf_surface_emit_alpha_linear_function (cairo_pdf_surface_t    *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t    *surface,
                                                 unsigned int	        n_stops,
                                                 cairo_pdf_color_stop_t *stops,
@@ -3087,7 +3087,7 @@ _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t    *surface,
 {
     cairo_pdf_resource_t res;
     unsigned int i;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     /* emit linear gradients between pairs of subsequent stops... */
     for (i = 0; i < n_stops-1; i++) {
@@ -3169,7 +3169,7 @@ calc_gradient_color (cairo_pdf_color_stop_t *new_stop,
 
 #define COLOR_STOP_EPSILON 1e-6
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_pattern_stops (cairo_pdf_surface_t      *surface,
                                        cairo_gradient_pattern_t *pattern,
                                        cairo_pdf_resource_t     *color_function,
@@ -3179,7 +3179,7 @@ _cairo_pdf_surface_emit_pattern_stops (cairo_pdf_surface_t      *surface,
     unsigned int n_stops;
     unsigned int i;
     cairo_bool_t emit_alpha = FALSE;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     color_function->id = 0;
     alpha_function->id = 0;
@@ -3313,7 +3313,7 @@ BAIL:
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_repeating_function (cairo_pdf_surface_t      *surface,
 					    cairo_gradient_pattern_t *pattern,
 					    cairo_pdf_resource_t     *function,
@@ -3374,14 +3374,14 @@ _cairo_pdf_surface_emit_repeating_function (cairo_pdf_surface_t      *surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 cairo_pdf_surface_emit_transparency_group (cairo_pdf_surface_t  *surface,
 					   cairo_pdf_pattern_t  *pdf_pattern,
 					   cairo_pdf_resource_t  gstate_resource,
 					   cairo_pdf_resource_t  gradient_mask)
 {
     cairo_pdf_resource_t smask_resource;
-    cairo_status_t status;
+    cairo_int_status_t status;
     char buf[100];
     double x1, y1, x2, y2;
 
@@ -3571,7 +3571,7 @@ _cairo_pdf_surface_output_gradient (cairo_pdf_surface_t        *surface,
 				     "endobj\n");
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_gradient (cairo_pdf_surface_t    *surface,
 				  cairo_pdf_pattern_t    *pdf_pattern)
 {
@@ -3580,7 +3580,7 @@ _cairo_pdf_surface_emit_gradient (cairo_pdf_surface_t    *surface,
     cairo_matrix_t pat_to_pdf;
     cairo_circle_double_t start, end;
     double domain[2];
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     assert (pattern->n_stops != 0);
 
@@ -3594,7 +3594,7 @@ _cairo_pdf_surface_emit_gradient (cairo_pdf_surface_t    *surface,
     pat_to_pdf = pattern->base.matrix;
     status = cairo_matrix_invert (&pat_to_pdf);
     /* cairo_pattern_set_matrix ensures the matrix is invertible */
-    assert (status == CAIRO_STATUS_SUCCESS);
+    assert (status == CAIRO_INT_STATUS_SUCCESS);
     cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
 
     if (pattern->base.extend == CAIRO_EXTEND_REPEAT ||
@@ -3717,12 +3717,12 @@ _cairo_pdf_surface_emit_gradient (cairo_pdf_surface_t    *surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_mesh_pattern (cairo_pdf_surface_t    *surface,
 				      cairo_pdf_pattern_t    *pdf_pattern)
 {
     cairo_matrix_t pat_to_pdf;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pattern_t *pattern = pdf_pattern->pattern;
     cairo_pdf_shading_t shading;
     int i;
@@ -3731,7 +3731,7 @@ _cairo_pdf_surface_emit_mesh_pattern (cairo_pdf_surface_t    *surface,
     pat_to_pdf = pattern->matrix;
     status = cairo_matrix_invert (&pat_to_pdf);
     /* cairo_pattern_set_matrix ensures the matrix is invertible */
-    assert (status == CAIRO_STATUS_SUCCESS);
+    assert (status == CAIRO_INT_STATUS_SUCCESS);
 
     cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
 
@@ -3862,11 +3862,11 @@ _cairo_pdf_surface_emit_mesh_pattern (cairo_pdf_surface_t    *surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pdf_pattern_t *pdf_pattern)
 {
     double old_width, old_height;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     old_width = surface->width;
     old_height = surface->height;
@@ -3907,7 +3907,7 @@ _cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pdf_pattern
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t          *surface,
 					  const cairo_pattern_t        *source,
 					  const cairo_rectangle_int_t  *extents,
@@ -3916,7 +3916,7 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t          *surface,
     cairo_pdf_resource_t surface_res;
     int width, height;
     cairo_matrix_t cairo_p2d, pdf_p2d;
-    cairo_status_t status;
+    cairo_int_status_t status;
     int alpha;
     cairo_rectangle_int_t extents2;
     double x_offset;
@@ -3954,7 +3954,7 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t          *surface,
     cairo_p2d = source->matrix;
     status = cairo_matrix_invert (&cairo_p2d);
     /* cairo_pattern_set_matrix ensures the matrix is invertible */
-    assert (status == CAIRO_STATUS_SUCCESS);
+    assert (status == CAIRO_INT_STATUS_SUCCESS);
 
     pdf_p2d = surface->cairo_to_pdf;
     cairo_matrix_multiply (&pdf_p2d, &cairo_p2d, &pdf_p2d);
@@ -3997,28 +3997,28 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t          *surface,
     return _cairo_pdf_surface_add_xobject (surface, surface_res);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t         *surface,
 				   const cairo_pattern_t       *source,
 				   const cairo_rectangle_int_t *extents)
 {
     cairo_pdf_resource_t shading_res, gstate_res;
     cairo_matrix_t pat_to_pdf;
-    cairo_status_t status;
+    cairo_int_status_t status;
     int alpha;
 
     status = _cairo_pdf_surface_add_pdf_shading (surface, source,
 						 extents,
 						 &shading_res, &gstate_res);
     if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO))
-	return CAIRO_STATUS_SUCCESS;
+	return CAIRO_INT_STATUS_SUCCESS;
     if (unlikely (status))
 	return status;
 
     pat_to_pdf = source->matrix;
     status = cairo_matrix_invert (&pat_to_pdf);
     /* cairo_pattern_set_matrix ensures the matrix is invertible */
-    assert (status == CAIRO_STATUS_SUCCESS);
+    assert (status == CAIRO_INT_STATUS_SUCCESS);
     cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
 
     status = _cairo_pdf_operators_flush (&surface->pdf_operators);
@@ -4060,7 +4060,7 @@ _cairo_pdf_surface_paint_gradient (cairo_pdf_surface_t         *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_paint_pattern (cairo_pdf_surface_t          *surface,
 				  const cairo_pattern_t        *source,
 				  const cairo_rectangle_int_t  *extents,
@@ -4112,11 +4112,11 @@ _can_paint_pattern (const cairo_pattern_t *pattern)
     }
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_select_operator (cairo_pdf_surface_t *surface,
 				    cairo_operator_t     op)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     if (op == surface->current_operator)
 	return CAIRO_STATUS_SUCCESS;
@@ -4133,13 +4133,13 @@ _cairo_pdf_surface_select_operator (cairo_pdf_surface_t *surface,
     return CAIRO_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_select_pattern (cairo_pdf_surface_t *surface,
 				   const cairo_pattern_t     *pattern,
 				   cairo_pdf_resource_t pattern_res,
 				   cairo_bool_t         is_stroke)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     int alpha;
     const cairo_color_t *solid_color = NULL;
 
@@ -4355,14 +4355,14 @@ _cairo_pdf_surface_write_pages (cairo_pdf_surface_t *surface)
 				 "endobj\n");
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _utf8_to_pdf_string (const char *utf8, char **str_out)
 {
     int i;
     int len;
     cairo_bool_t ascii;
     char *str;
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
 
     ascii = TRUE;
     len = strlen (utf8);
@@ -4410,13 +4410,13 @@ _utf8_to_pdf_string (const char *utf8, char **str_out)
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_unicode_for_glyph (cairo_pdf_surface_t	*surface,
 					   const char 		*utf8)
 {
     uint16_t *utf16 = NULL;
     int utf16_len = 0;
-    cairo_status_t status;
+    cairo_int_status_t status;
     int i;
 
     if (utf8 && *utf8) {
@@ -4640,7 +4640,7 @@ _cairo_pdf_surface_emit_to_unicode_stream (cairo_pdf_surface_t		*surface,
 
 #define PDF_UNITS_PER_EM 1000
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t		*surface,
                                   cairo_scaled_font_subset_t	*font_subset,
                                   cairo_cff_subset_t            *subset)
@@ -4649,7 +4649,7 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t		*surface,
     cairo_pdf_resource_t subset_resource, to_unicode_stream;
     cairo_pdf_font_t font;
     unsigned int i, last_glyph;
-    cairo_status_t status;
+    cairo_int_status_t status;
     char tag[10];
 
     _create_font_subset_tag (font_subset, subset->ps_name, tag);
@@ -4679,7 +4679,7 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t		*surface,
     status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
 	                                                font_subset,
 							&to_unicode_stream);
-    if (_cairo_status_is_error (status))
+    if (_cairo_int_status_is_error (status))
 	return status;
 
     descriptor = _cairo_pdf_surface_new_object (surface);
@@ -4837,11 +4837,11 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t		*surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_cff_font_subset (cairo_pdf_surface_t	     *surface,
                                          cairo_scaled_font_subset_t  *font_subset)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_cff_subset_t subset;
     char name[64];
 
@@ -4858,11 +4858,11 @@ _cairo_pdf_surface_emit_cff_font_subset (cairo_pdf_surface_t	     *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_cff_fallback_font (cairo_pdf_surface_t	       *surface,
                                            cairo_scaled_font_subset_t  *font_subset)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_cff_subset_t subset;
     char name[64];
 
@@ -4884,14 +4884,14 @@ _cairo_pdf_surface_emit_cff_fallback_font (cairo_pdf_surface_t	       *surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t		*surface,
                                     cairo_scaled_font_subset_t	*font_subset,
                                     cairo_type1_subset_t        *subset)
 {
     cairo_pdf_resource_t stream, descriptor, subset_resource, to_unicode_stream;
     cairo_pdf_font_t font;
-    cairo_status_t status;
+    cairo_int_status_t status;
     unsigned long length;
     unsigned int i, last_glyph;
     char tag[10];
@@ -4926,7 +4926,7 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t		*surface,
     status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
 	                                                font_subset,
 							&to_unicode_stream);
-    if (_cairo_status_is_error (status))
+    if (_cairo_int_status_is_error (status))
 	return status;
 
     last_glyph = font_subset->num_glyphs - 1;
@@ -5026,11 +5026,11 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t		*surface,
     return _cairo_array_append (&surface->fonts, &font);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_type1_font_subset (cairo_pdf_surface_t		*surface,
 					   cairo_scaled_font_subset_t	*font_subset)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_type1_subset_t subset;
     char name[64];
 
@@ -5050,11 +5050,11 @@ _cairo_pdf_surface_emit_type1_font_subset (cairo_pdf_surface_t		*surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_type1_fallback_font (cairo_pdf_surface_t	*surface,
                                              cairo_scaled_font_subset_t	*font_subset)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_type1_subset_t subset;
     char name[64];
 
@@ -5074,13 +5074,13 @@ _cairo_pdf_surface_emit_type1_fallback_font (cairo_pdf_surface_t	*surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t		*surface,
 					      cairo_scaled_font_subset_t	*font_subset)
 {
     cairo_pdf_resource_t stream, descriptor, cidfont_dict;
     cairo_pdf_resource_t subset_resource, to_unicode_stream;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_pdf_font_t font;
     cairo_truetype_subset_t subset;
     unsigned int i, last_glyph;
@@ -5120,7 +5120,7 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t		*surface,
     status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
 	                                                font_subset,
 							&to_unicode_stream);
-    if (_cairo_status_is_error (status)) {
+    if (_cairo_int_status_is_error (status)) {
 	_cairo_truetype_subset_fini (&subset);
 	return status;
     }
@@ -5287,7 +5287,7 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t		*surface,
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_emit_imagemask (cairo_image_surface_t *image,
 			     cairo_output_stream_t *stream)
 {
@@ -5332,8 +5332,8 @@ _cairo_pdf_surface_analyze_user_font_subset (cairo_scaled_font_subset_t *font_su
 					     void		        *closure)
 {
     cairo_pdf_surface_t *surface = closure;
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
-    cairo_status_t status2;
+    cairo_int_status_t status = CAIRO_INT_STATUS_SUCCESS;
+    cairo_int_status_t status2;
     unsigned int i;
     cairo_surface_t *type3_surface;
     cairo_output_stream_t *null_stream;
@@ -5361,7 +5361,7 @@ _cairo_pdf_surface_analyze_user_font_subset (cairo_scaled_font_subset_t *font_su
 
     cairo_surface_destroy (type3_surface);
     status2 = _cairo_output_stream_destroy (null_stream);
-    if (status == CAIRO_STATUS_SUCCESS)
+    if (status == CAIRO_INT_STATUS_SUCCESS)
 	status = status2;
 
     return status;
@@ -5371,7 +5371,7 @@ static cairo_int_status_t
 _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
 					   cairo_scaled_font_subset_t	*font_subset)
 {
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
     cairo_pdf_resource_t *glyphs, encoding, char_procs, subset_resource, to_unicode_stream;
     cairo_pdf_font_t font;
     double *widths;
@@ -5500,7 +5500,7 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
     status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
 	                                                font_subset,
 							&to_unicode_stream);
-    if (_cairo_status_is_error (status)) {
+    if (_cairo_int_status_is_error (status)) {
 	free (widths);
 	return status;
     }
@@ -5598,10 +5598,10 @@ _cairo_pdf_surface_emit_scaled_font_subset (cairo_scaled_font_subset_t *font_sub
     return CAIRO_INT_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_emit_font_subsets (cairo_pdf_surface_t *surface)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     status = _cairo_scaled_font_subsets_foreach_user (surface->font_subsets,
 						      _cairo_pdf_surface_analyze_user_font_subset,
@@ -5681,7 +5681,7 @@ _cairo_pdf_surface_write_xref (cairo_pdf_surface_t *surface)
     return offset;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t	*surface,
 				     cairo_pdf_smask_group_t	*group)
 {
@@ -5689,7 +5689,7 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t	*surface,
     cairo_pdf_resource_t smask;
     cairo_pdf_smask_group_t *smask_group;
     cairo_pdf_resource_t pattern_res, gstate_res;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_box_double_t bbox;
 
     /* Create mask group */
@@ -5869,12 +5869,12 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t	*surface,
     return _cairo_output_stream_get_status (surface->output);
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_smask_group (cairo_pdf_surface_t     *surface,
 				      cairo_pdf_smask_group_t *group)
 {
     double old_width, old_height;
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_box_double_t bbox;
 
     old_width = surface->width;
@@ -5948,14 +5948,14 @@ RESTORE_SIZE:
     return status;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_patterns_and_smask_groups (cairo_pdf_surface_t *surface)
 {
     cairo_pdf_pattern_t pattern;
     cairo_pdf_smask_group_t *group;
     cairo_pdf_source_surface_t src_surface;
     unsigned int pattern_index, group_index, surface_index;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     /* Writing out PDF_MASK groups will cause additional smask groups
      * to be appended to surface->smask_groups. Additional patterns
@@ -5996,11 +5996,11 @@ _cairo_pdf_surface_write_patterns_and_smask_groups (cairo_pdf_surface_t *surface
     return CAIRO_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface)
 {
     cairo_pdf_resource_t page, knockout, res;
-    cairo_status_t status;
+    cairo_int_status_t status;
     unsigned int i, len;
 
     _cairo_pdf_group_resources_clear (&surface->resources);
@@ -6312,7 +6312,7 @@ static cairo_int_status_t
 _cairo_pdf_surface_start_fallback (cairo_pdf_surface_t *surface)
 {
     cairo_box_double_t bbox;
-    cairo_status_t status;
+    cairo_int_status_t status;
 
     status = _cairo_pdf_surface_close_content_stream (surface);
     if (unlikely (status))
@@ -6337,7 +6337,7 @@ _cairo_pdf_surface_emit_stencil_mask (cairo_pdf_surface_t         *surface,
 				      const cairo_pattern_t       *mask,
 				      const cairo_rectangle_int_t *extents)
 {
-    cairo_status_t status;
+    cairo_int_status_t status;
     cairo_image_surface_t  *image;
     void		   *image_extra;
     cairo_image_transparency_t transparency;
@@ -6550,7 +6550,7 @@ _cairo_pdf_surface_mask (void			*abstract_surface,
 	return status;
 
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) {
-	cairo_status_t source_status, mask_status;
+	cairo_int_status_t source_status, mask_status;
 
 	status = _cairo_pdf_surface_analyze_operation (surface, op, source, &extents.bounded);
 	if (_cairo_int_status_is_error (status))
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 877ba14..5e6206a 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -530,7 +530,7 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t		*surface,
     return CAIRO_STATUS_SUCCESS;
 }
 
-static cairo_status_t
+static cairo_int_status_t
 _cairo_ps_emit_imagemask (cairo_image_surface_t *image,
 			  cairo_output_stream_t *stream)
 {
diff --git a/src/cairo-type3-glyph-surface-private.h b/src/cairo-type3-glyph-surface-private.h
index b4abcf6..6cd37de 100644
--- a/src/cairo-type3-glyph-surface-private.h
+++ b/src/cairo-type3-glyph-surface-private.h
@@ -45,8 +45,9 @@
 #include "cairo-surface-clipper-private.h"
 #include "cairo-pdf-operators-private.h"
 
-typedef cairo_status_t (*cairo_type3_glyph_surface_emit_image_t) (cairo_image_surface_t *image,
-								  cairo_output_stream_t	*stream);
+typedef cairo_int_status_t
+(*cairo_type3_glyph_surface_emit_image_t) (cairo_image_surface_t *image,
+					   cairo_output_stream_t	*stream);
 
 typedef struct cairo_type3_glyph_surface {
     cairo_surface_t base;
commit d4545910e2836eb6fc7dc2ed787b02aea514cb0b
Author: Bryce W. Harrington <b.harrington at samsung.com>
Date:   Thu Jun 20 03:16:01 2013 +0000

    test: Note naming scheme for XFAIL images in README
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/test/README b/test/README
index fef240d..bbb3596 100644
--- a/test/README
+++ b/test/README
@@ -256,8 +256,9 @@ correct, then there's likely a bug in poppler. In this case, we can
 simply report the poppler bug, (making it block 12143 above), post the
 PDF result from the test suite, and list the bug in this file. Once
 we've done this, we can capture poppler's buggy output as a
-pdf-specific reference image so that the test suite will regard the
-test as passing, (and we'll ensure there is no regression).
+pdf-specific reference image (as reference/*.xfail.png) so that the 
+test suite will regard the test as passing, (and we'll ensure there
+is no regression).
 
 Once the poppler bug gets fixed, the test suite will start reporting a
 false negative again, and this will be easy to fix by simply removing
commit 982f288460591a8f2b8a78db89ae6e5495d2b3b8
Author: Bryce W. Harrington <b.harrington at samsung.com>
Date:   Thu Jun 20 03:16:29 2013 +0000

    gl: Quell warning about incompatible pointer type
    
    mask is a cairo_surface_t pointer, and is cast to a cairo_gl_surface_t
    pointer in the _cairo_gl_surface_draw_image() call.
    texture.owns_surface also expects mask to be a cairo_gl_surface_t
    pointer, so apply the same cast here as well.
    
    Fixes the following warning:
    
     cairo-gl-traps-compositor.c:370:35: warning: assignment from
      incompatible pointer type [enabled by default]
    
    Ref.: 38bf7a65
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-gl-traps-compositor.c b/src/cairo-gl-traps-compositor.c
index 548162b..ec478ee 100644
--- a/src/cairo-gl-traps-compositor.c
+++ b/src/cairo-gl-traps-compositor.c
@@ -367,7 +367,7 @@ traps_to_operand (void *_dst,
     if (unlikely (status))
 	goto error;
 
-    operand->texture.owns_surface = mask;
+    operand->texture.owns_surface = (cairo_gl_surface_t *)mask;
     return CAIRO_STATUS_SUCCESS;
 
 error:
commit aa764a3bbc3fe43191d877aaec42b73c7d55d040
Author: Bryce W. Harrington <b.harrington at samsung.com>
Date:   Thu Jun 20 03:17:38 2013 +0000

    pdf: Assure compiler that data, data_size will always be initialized
    
    There are only three possible color states:  COLOR, GRAYSCALE, or
    MONOCHROME thus data and data_size will always be set to some value,
    so assert the default is never reached.
    
    Fixes these warning:
      cairo-pdf-surface.c:2517:32: warning: ‘data_size’ may be used
       uninitialized in this function [-Wuninitialized]
      cairo-pdf-surface.c:2338:19: note: ‘data_size’ was declared here
      cairo-pdf-surface.c:2446:11: warning: ‘data’ may be used uninitialized
       in this function [-Wuninitialized]
      cairo-pdf-surface.c:2337:11: note: ‘data’ was declared here
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 1b76ca9..a9c1207 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -2389,8 +2389,10 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t     *surface,
 
     color = _cairo_image_analyze_color (image);
     switch (color) {
-	case CAIRO_IMAGE_IS_COLOR:
+        default:
 	case CAIRO_IMAGE_UNKNOWN_COLOR:
+	    ASSERT_NOT_REACHED;
+	case CAIRO_IMAGE_IS_COLOR:
 	    data_size = image->height * image->width * 3;
 	    data = _cairo_malloc_abc (image->width, image->height, 3);
 	    break;
commit 27cb80b84834f7262d70cd1f95dd6e940059f75a
Author: Bryce W. Harrington <b.harrington at samsung.com>
Date:   Thu Jun 20 03:18:11 2013 +0000

    type1-subset: Fix typos in function comment
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index a2ba13e..e2c799d 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1256,21 +1256,21 @@ cairo_type1_font_subset_write_private_dict (cairo_type1_font_subset_t *font,
      * the actual glyph definitions (charstrings).
      *
      * What we do here is scan directly to the /Subrs token, which
-     * marks the beginning of the subroutines. We then read in all the
-     * subroutines then move on to the /CharString token, which marks
-     * the beginning of the glyph definitions, and read in the chastrings.
+     * marks the beginning of the subroutines. We read in all the
+     * subroutines, then move on to the /CharString token, which marks
+     * the beginning of the glyph definitions, and read in the charstrings.
      *
-     * The charstrings are parsed to extracts glyph widths, work out
-     * which subroutines are called, and too see if any extra glyphs
+     * The charstrings are parsed to extract glyph widths, work out
+     * which subroutines are called, and to see if any extra glyphs
      * need to be included due to the use of the seac glyph combining
      * operator.
      *
-     * Finally the private dict is copied to the subset font minus the
+     * Finally, the private dict is copied to the subset font minus the
      * subroutines and charstrings not required.
      */
 
     /* Determine lenIV, the number of random characters at the start of
-       each encrypted charstring. The defaults is 4, but this can be
+       each encrypted charstring. The default is 4, but this can be
        overridden in the private dict. */
     font->lenIV = 4;
     if ((lenIV_start = find_token (font->cleartext, font->cleartext_end, "/lenIV")) != NULL) {
commit f893acd60df816f3e0282affef6b58f59f84f48a
Author: Bryce W. Harrington <b.harrington at samsung.com>
Date:   Thu Jun 20 03:18:45 2013 +0000

    type1-subset: Quell warning about uninitialized array_start
    
    Since we explicitly set font->subset_subrs to false, there's no way the
    warned code will be executed, but perhaps the compiler is confused by
    the goto jump.
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 383c99a..a2ba13e 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1306,6 +1306,7 @@ cairo_type1_font_subset_write_private_dict (cairo_type1_font_subset_t *font,
     if (subrs == NULL) {
 	font->subset_subrs = FALSE;
 	p = font->cleartext;
+	array_start = NULL;
 	goto skip_subrs;
     }
 


More information about the cairo-commit mailing list