[cairo-commit] 4 commits - doc/public src/cairo-paginated-surface.c src/cairo-paginated-surface-private.h src/cairo-pdf-surface.c src/cairo-ps-surface.c src/test-paginated-surface.c

Carl Worth cworth at kemper.freedesktop.org
Fri Apr 14 15:26:52 PDT 2006


 doc/public/tmpl/cairo-svg.sgml        |    2 
 src/cairo-paginated-surface-private.h |   72 ++++++++++++++-
 src/cairo-paginated-surface.c         |   48 ++++------
 src/cairo-pdf-surface.c               |  161 +++++++++++++++++++++-------------
 src/cairo-ps-surface.c                |   78 ++++++----------
 src/test-paginated-surface.c          |    1 
 6 files changed, 229 insertions(+), 133 deletions(-)

New commits:
diff-tree b8fb8dc375d2828a962bac2e1f50f44d8ec8cbee (from 2726f684547de7d381e56dce13bb7c025cd75b80)
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Apr 14 15:23:30 2006 -0700

    Add stub implementations of drawing operations for the PDF backend.
    
    These new stubs explicitly return UNSUPPORTED unconditionally. This is
    no different than the implicit UNSUPPORTED which the analysis surface
    was inferring from NULL for 4 of the functions before.
    
    However, _cairo_pdf_surface_fill was actually trying to draw things,
    but without correctly characterizing it during the analysis stage.
    This was just an oversight, as the PDF surface was always triggereing
    full page fall backs anway due to the initial unsupported paint with
    CLEAR.
    
    Now, we explicitly return UNSUPPORTED for all drawing operations so we
    get image fallbacks by design and not by accident.

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 033ba04..291d3d1 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1349,59 +1349,6 @@ _cairo_pdf_path_close_path (void *closur
 }
 
 static cairo_int_status_t
-_cairo_pdf_surface_fill (void			*abstract_surface,
-			 cairo_operator_t	 op,
-			 cairo_pattern_t	*pattern,
-			 cairo_path_fixed_t	*path,
-			 cairo_fill_rule_t	 fill_rule,
-			 double			 tolerance,
-			 cairo_antialias_t	 antialias)
-{
-    cairo_pdf_surface_t *surface = abstract_surface;
-    cairo_pdf_document_t *document = surface->document;
-    const char *pdf_operator;
-    cairo_status_t status;
-    pdf_path_info_t info;
-
-    status = emit_pattern (surface, pattern);
-    if (status)
-	return status;
-
-    /* After the above switch the current stream should belong to this
-     * surface, so no need to _cairo_pdf_surface_ensure_stream() */
-    assert (document->current_stream != NULL &&
-	    document->current_stream == surface->current_stream);
-
-    info.output_stream = document->output_stream;
-    info.has_current_point = FALSE;
-
-    status = _cairo_path_fixed_interpret (path,
-					  CAIRO_DIRECTION_FORWARD,
-					  _cairo_pdf_path_move_to,
-					  _cairo_pdf_path_line_to,
-					  _cairo_pdf_path_curve_to,
-					  _cairo_pdf_path_close_path,
-					  &info);
-
-    switch (fill_rule) {
-    case CAIRO_FILL_RULE_WINDING:
-	pdf_operator = "f";
-	break;
-    case CAIRO_FILL_RULE_EVEN_ODD:
-	pdf_operator = "f*";
-	break;
-    default:
-	ASSERT_NOT_REACHED;
-    }
-
-    _cairo_output_stream_printf (document->output_stream,
-				 "%s\r\n",
-				 pdf_operator);
-
-    return status;
-}
-  
-static cairo_int_status_t
 _cairo_pdf_surface_composite_trapezoids (cairo_operator_t	op,
 					 cairo_pattern_t	*pattern,
 					 void			*abstract_dst,
@@ -2091,6 +2038,104 @@ _cairo_pdf_document_add_page (cairo_pdf_
     return CAIRO_STATUS_SUCCESS;
 }
 
+static cairo_int_status_t
+_cairo_pdf_surface_paint (void			*abstract_surface,
+			  cairo_operator_t	 op,
+			  cairo_pattern_t	*source)
+{
+    return CAIRO_INT_STATUS_UNSUPPORTED;
+}
+
+static cairo_int_status_t
+_cairo_pdf_surface_mask	(void			*abstract_surface,
+			 cairo_operator_t	 op,
+			 cairo_pattern_t	*source,
+			 cairo_pattern_t	*mask)
+{
+    return CAIRO_INT_STATUS_UNSUPPORTED;
+}
+
+static cairo_int_status_t
+_cairo_pdf_surface_stroke (void			*abstract_surface,
+			   cairo_operator_t	 op,
+			   cairo_pattern_t	*source,
+			   cairo_path_fixed_t	*path,
+			   cairo_stroke_style_t	*style,
+			   cairo_matrix_t	*ctm,
+			   cairo_matrix_t	*ctm_inverse,
+			   double		 tolerance,
+			   cairo_antialias_t	 antialias)
+{
+    return CAIRO_INT_STATUS_UNSUPPORTED;
+}
+
+static cairo_int_status_t
+_cairo_pdf_surface_fill (void			*abstract_surface,
+			 cairo_operator_t	 op,
+			 cairo_pattern_t	*pattern,
+			 cairo_path_fixed_t	*path,
+			 cairo_fill_rule_t	 fill_rule,
+			 double			 tolerance,
+			 cairo_antialias_t	 antialias)
+{
+    cairo_pdf_surface_t *surface = abstract_surface;
+    cairo_pdf_document_t *document = surface->document;
+    const char *pdf_operator;
+    cairo_status_t status;
+    pdf_path_info_t info;
+
+    /* XXX: Temporarily disabling all "native" PDF output. */
+    return CAIRO_INT_STATUS_UNSUPPORTED;
+
+    status = emit_pattern (surface, pattern);
+    if (status)
+	return status;
+
+    /* After the above switch the current stream should belong to this
+     * surface, so no need to _cairo_pdf_surface_ensure_stream() */
+    assert (document->current_stream != NULL &&
+	    document->current_stream == surface->current_stream);
+
+    info.output_stream = document->output_stream;
+    info.has_current_point = FALSE;
+
+    status = _cairo_path_fixed_interpret (path,
+					  CAIRO_DIRECTION_FORWARD,
+					  _cairo_pdf_path_move_to,
+					  _cairo_pdf_path_line_to,
+					  _cairo_pdf_path_curve_to,
+					  _cairo_pdf_path_close_path,
+					  &info);
+
+    switch (fill_rule) {
+    case CAIRO_FILL_RULE_WINDING:
+	pdf_operator = "f";
+	break;
+    case CAIRO_FILL_RULE_EVEN_ODD:
+	pdf_operator = "f*";
+	break;
+    default:
+	ASSERT_NOT_REACHED;
+    }
+
+    _cairo_output_stream_printf (document->output_stream,
+				 "%s\r\n",
+				 pdf_operator);
+
+    return status;
+}
+
+static cairo_int_status_t
+_cairo_pdf_surface_show_glyphs (void			*abstract_surface,
+				cairo_operator_t	 op,
+				cairo_pattern_t		*source,
+				const cairo_glyph_t	*glyphs,
+				int			 num_glyphs,
+				cairo_scaled_font_t	*scaled_font)
+{
+    return CAIRO_INT_STATUS_UNSUPPORTED;
+}
+
 static void
 _cairo_pdf_surface_set_paginated_mode (void			*abstract_surface,
 				       cairo_paginated_mode_t	 paginated_mode)
@@ -2126,11 +2171,12 @@ static const cairo_surface_backend_t cai
 
     /* Here are the drawing functions */
 
-    NULL, /* paint */
-    NULL, /* mask */
-    NULL, /* stroke */
+    _cairo_pdf_surface_paint,
+    _cairo_pdf_surface_mask,
+    _cairo_pdf_surface_stroke,
     _cairo_pdf_surface_fill,
-    NULL  /* show_glyphs */
+    _cairo_pdf_surface_show_glyphs,
+    NULL, /* snapshot */
 };
 
 static const cairo_paginated_surface_backend_t cairo_pdf_surface_paginated_backend = {
diff-tree 2726f684547de7d381e56dce13bb7c025cd75b80 (from 8d3a800b82ccd4a39bf04cc1d602eb84d90f81d1)
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Apr 14 14:53:13 2006 -0700

    Update documentation of cairo_paginated_surface

diff --git a/src/cairo-paginated-surface-private.h b/src/cairo-paginated-surface-private.h
index c18cb3c..247ed72 100644
--- a/src/cairo-paginated-surface-private.h
+++ b/src/cairo-paginated-surface-private.h
@@ -71,6 +71,18 @@ typedef struct _cairo_paginated_surface_
  * have paginated output, (that is, things directed at printers, or
  * for saving content in files such as PostScript or PDF files).
  *
+ * To use the paginated surface, you'll first need to create your
+ * 'real' surface using _cairo_surface_init and the standard
+ * cairo_surface_backend_t. Then you also call
+ * _cairo_paginated_surface_create which takes its own, much simpler,
+ * cairo_paginated_surface_backend. You are free to return the result
+ * of _cairo_paginated_surface_create from your public
+ * cairo_<foo>_surface_create. The paginated backend will be careful
+ * to not let the user see that they really got a "wrapped"
+ * surface. See test-paginated-surface.c for a fairly minimal example
+ * of a paginated-using surface. That should be a reasonable example
+ * to follow.
+ *
  * What the paginated surface does is first save all drawing
  * operations for a page into a meta-surface. Then when the user calls
  * cairo_show_page, the paginated surface performs the following
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index 475db3e..01b6ed8 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -36,33 +36,8 @@
 
 /* The paginated surface layer exists to provide as much code sharing
  * as possible for the various paginated surface backends in cairo
- * (PostScript, PDF, etc.).
- *
- * The concept is that a surface which uses a paginated surface merely
- * needs to implement backend operations which it can accurately
- * provide, (and return CAIRO_INT_STATUS_UNSUPPORTED or leave backend
- * function pointers NULL otherwise). The paginated surface is the
- * responsible for collecting operations that aren't supported,
- * replaying them against the image surface, and then supplying the
- * resulting images to the target surface.
- *
- * When created, a paginated surface accepts the target surface to
- * which the final drawing will eventually be performed. The paginated
- * surface then uses cairo_meta_surface_t to record all drawing
- * operations up until each show_page operation.
- *
- * At the time of show_page, the paginated surface replays the meta
- * surface against the target surface and maintains regions of the
- * result that will come from the nativ surface and regions that will
- * need to come from image fallbacks. It then replays the necessary
- * portions against image surface and provides those results to the
- * target surface through existing interfaces.
- *
- * This way the target surface is never even aware of any distinction
- * between native drawing operations vs. results that are supplied by
- * image fallbacks. Instead the surface need only implement as much of
- * the surface backend interface as it can do correctly, and let the
- * paginated surface take care of all the messy details.
+ * (PostScript, PDF, etc.). See cairo-paginated-surface-private.h for
+ * more details on how it works and how to use it.
  */
 
 #include "cairoint.h"
diff-tree 8d3a800b82ccd4a39bf04cc1d602eb84d90f81d1 (from 687802cca67ce4157725316d769fc28bc75f5dcd)
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Apr 14 14:46:59 2006 -0700

    Add a start_page function to the paginated_surface_backend.
    
    This allows for any surface using the paginated_surface backend to
    easily do stuff at the beginning of each page, (such as writing out
    any per-page header necessary).
    
    This replaces some of the per-page state tracking that the PS surface
    was doing, (though it still has some left for its optimization of
    CLEAR on a blank page).

diff --git a/src/cairo-paginated-surface-private.h b/src/cairo-paginated-surface-private.h
index 42cb9ef..c18cb3c 100644
--- a/src/cairo-paginated-surface-private.h
+++ b/src/cairo-paginated-surface-private.h
@@ -44,11 +44,67 @@ typedef enum {
 } cairo_paginated_mode_t;
 
 typedef struct _cairo_paginated_surface_backend {
+    /* Optional. Will be called once for each page.
+     *
+     * NOTE: With respect to the order of drawing operations as seen
+     * by the target, this call will occur before any drawing
+     * operations for the relevant page. However, with respect to the
+     * function calls as made by the user, this call will be *after*
+     * any drawing operations for the page, (that is, it will occur
+     * during the user's call to cairo_show_page or cairo_copy_page).
+     */
+    cairo_int_status_t
+    (*start_page)		(void			*surface);
+
+    /* Required. Will be called twice for each page, once with an
+     * argument of CAIRO_PAGINATED_MODE_ANALYZE and once with
+     * CAIRO_PAGINATED_MODE_RENDER. See more details in the
+     * documentation for _cairo_paginated_surface_create below.
+     */
     void
-    (*set_paginated_mode)	 (void				*surface,
-				  cairo_paginated_mode_t	 mode);
+    (*set_paginated_mode)	(void			*surface,
+				 cairo_paginated_mode_t	 mode);
 } cairo_paginated_surface_backend_t;
 
+/* A cairo_paginated_surface provides a very convenient wrapper that
+ * is well-suited for doing the analysis common to most surfaces that
+ * have paginated output, (that is, things directed at printers, or
+ * for saving content in files such as PostScript or PDF files).
+ *
+ * What the paginated surface does is first save all drawing
+ * operations for a page into a meta-surface. Then when the user calls
+ * cairo_show_page, the paginated surface performs the following
+ * sequence of operations (using the backend functions passed to
+ * cairo_paginated_surface_create):
+ *
+ * 1. Calls start_page (if non NULL). At this point, it is appropriate
+ *    for the target to emit any page-specific header information into
+ *    its output.
+ *
+ * 2. Calls set_paginated_mode with an argument of CAIRO_PAGINATED_MODE_ANALYZE
+ *
+ * 3. Replays the meta-surface to the target surface, (with an
+ *    analysis surface inserted between which watches the return value
+ *    from each operation). This analysis stage is used to decide which
+ *    operations will require fallbacks.
+ *
+ * 4. Calls set_paginated_mode with an argument of CAIRO_PAGINATED_MODE_RENDER
+ *
+ * 5. Replays a subset of the meta-surface operations to the target surface
+ *
+ * 6. Replays the remaining operations to an image surface, sets an
+ *    appropriate clip on the target, then paints the resulting image
+ *    surface to the target.
+ *
+ * So, the target will see drawing operations during two separate
+ * stages, (ANALYZE and RENDER). During the ANALYZE phase the target
+ * should not actually perform any rendering, (for example, if
+ * performing output to a file, no output should be generated during
+ * this stage). Instead the drawing functions simply need to return
+ * CAIRO_STATUS_SUCCESS or CAIRO_INT_STATUS_UNSUPPORTED to indicate
+ * whether rendering would be supported. And it should do this as
+ * quickly as possible.
+ */
 cairo_private cairo_surface_t *
 _cairo_paginated_surface_create (cairo_surface_t				*target,
 				 cairo_content_t				 content,
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index 26be219..475db3e 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -266,11 +266,25 @@ _paint_page (cairo_paginated_surface_t *
     return CAIRO_STATUS_SUCCESS;
 }
 
+static cairo_status_t
+_start_page (cairo_paginated_surface_t *surface)
+{
+    if (! surface->backend->start_page)
+	return CAIRO_STATUS_SUCCESS;
+
+    return (surface->backend->start_page) (surface->target);
+}
+
 static cairo_int_status_t
 _cairo_paginated_surface_copy_page (void *abstract_surface)
 {
+    cairo_status_t status;
     cairo_paginated_surface_t *surface = abstract_surface;
 
+    status = _start_page (surface);
+    if (status)
+	return status;
+
     _paint_page (surface);
 
     /* XXX: It might make sense to add some suport here for calling
@@ -289,8 +303,13 @@ _cairo_paginated_surface_copy_page (void
 static cairo_int_status_t
 _cairo_paginated_surface_show_page (void *abstract_surface)
 {
+    cairo_status_t status;
     cairo_paginated_surface_t *surface = abstract_surface;
 
+    status = _start_page (surface);
+    if (status)
+	return status;
+
     _paint_page (surface);
 
     _cairo_surface_show_page (surface->target);
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index dfbae37..033ba04 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -2134,5 +2134,6 @@ static const cairo_surface_backend_t cai
 };
 
 static const cairo_paginated_surface_backend_t cairo_pdf_surface_paginated_backend = {
+    NULL, /* start_page */
     _cairo_pdf_surface_set_paginated_mode
 };
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index f398176..84efa6e 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -96,7 +96,7 @@ typedef struct cairo_ps_surface {
     double x_dpi;
     double y_dpi;
 
-    cairo_bool_t need_start_page; 
+    cairo_bool_t page_is_blank;
     int num_pages;
 
     cairo_paginated_mode_t paginated_mode;
@@ -574,7 +574,7 @@ _cairo_ps_surface_create_for_stream_inte
     surface->y_dpi = PS_SURFACE_DPI_DEFAULT;
     surface->paginated_mode = CAIRO_PAGINATED_MODE_ANALYZE;
 
-    surface->need_start_page = TRUE;
+    surface->page_is_blank = TRUE;
     surface->num_pages = 0;
 
     return _cairo_paginated_surface_create (&surface->base,
@@ -842,9 +842,11 @@ _cairo_ps_surface_finish (void *abstract
     return status;
 }
 
-static void
-_cairo_ps_surface_start_page (cairo_ps_surface_t *surface)
+static cairo_int_status_t
+_cairo_ps_surface_start_page (void *abstract_surface)
 {
+    cairo_ps_surface_t *surface = abstract_surface;
+
     /* Increment before print so page numbers start at 1. */
     surface->num_pages++;
     _cairo_output_stream_printf (surface->stream,
@@ -858,7 +860,7 @@ _cairo_ps_surface_start_page (cairo_ps_s
 				 1.0/surface->base.device_x_scale,
 				 -1.0/surface->base.device_y_scale);
 
-    surface->need_start_page = FALSE;
+    return _cairo_output_stream_get_status (surface->stream);
 }
 
 static void
@@ -866,8 +868,6 @@ _cairo_ps_surface_end_page (cairo_ps_sur
 {
     _cairo_output_stream_printf (surface->stream,
 				 "grestore\n");
-
-    surface->need_start_page = TRUE;
 }
 
 static cairo_int_status_t
@@ -891,8 +891,6 @@ _cairo_ps_surface_show_page (void *abstr
 
     _cairo_output_stream_printf (surface->stream, "showpage\n");
 
-    surface->need_start_page = TRUE;
-
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -1062,11 +1060,6 @@ operation_supported (cairo_ps_surface_t 
 		      cairo_operator_t op,
 		      const cairo_pattern_t *pattern)
 {
-    /* As a special-case, (see all drawing operations below), we
-     * optimize away any erasing where nothing has been drawn yet. */
-    if (surface->need_start_page && op == CAIRO_OPERATOR_CLEAR)
-	return TRUE;
-
     if (! pattern_supported (pattern))
 	return FALSE;
 
@@ -1460,9 +1453,6 @@ _cairo_ps_surface_intersect_clip_path (v
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return CAIRO_STATUS_SUCCESS;
 
-    if (surface->need_start_page)
-	_cairo_ps_surface_start_page (surface);
-
     _cairo_output_stream_printf (stream,
 				 "%% _cairo_ps_surface_intersect_clip_path\n");
 
@@ -1528,6 +1518,12 @@ _cairo_ps_surface_paint (void			*abstrac
     cairo_output_stream_t *stream = surface->stream;
     cairo_ps_surface_path_info_t info;
 
+    /* Optimize away erasing of nothing. */
+    if (surface->page_is_blank && op == CAIRO_OPERATOR_CLEAR)
+	return CAIRO_STATUS_SUCCESS;
+
+    surface->page_is_blank = FALSE;
+
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _analyze_operation (surface, op, source);
 
@@ -1541,13 +1537,6 @@ _cairo_ps_surface_paint (void			*abstrac
     assert (pattern_operation_supported (op, source));
     */
     
-    if (surface->need_start_page) {
-	/* Optimize away erasing of nothing. */
-	if (op == CAIRO_OPERATOR_CLEAR)
-	    return CAIRO_STATUS_SUCCESS;
-	_cairo_ps_surface_start_page (surface);
-    }
-
     _cairo_output_stream_printf (stream,
 				 "%% _cairo_ps_surface_paint\n");
 
@@ -1613,18 +1602,17 @@ _cairo_ps_surface_stroke (void			*abstra
     cairo_int_status_t status;
     cairo_ps_surface_path_info_t info;
 
+    /* Optimize away erasing of nothing. */
+    if (surface->page_is_blank && op == CAIRO_OPERATOR_CLEAR)
+	return CAIRO_STATUS_SUCCESS;
+
+    surface->page_is_blank = FALSE;
+
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _analyze_operation (surface, op, source);
 
     assert (operation_supported (surface, op, source));
     
-    if (surface->need_start_page) {
-	/* Optimize away erasing of nothing. */
-	if (op == CAIRO_OPERATOR_CLEAR)
-	    return CAIRO_STATUS_SUCCESS;
-	_cairo_ps_surface_start_page (surface);
-    }
-
     _cairo_output_stream_printf (stream,
 				 "%% _cairo_ps_surface_stroke\n");
 
@@ -1693,18 +1681,17 @@ _cairo_ps_surface_fill (void		*abstract_
     cairo_ps_surface_path_info_t info;
     const char *ps_operator;
 
+    /* Optimize away erasing of nothing. */
+    if (surface->page_is_blank && op == CAIRO_OPERATOR_CLEAR)
+	return CAIRO_STATUS_SUCCESS;
+
+    surface->page_is_blank = FALSE;
+
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _analyze_operation (surface, op, source);
 
     assert (operation_supported (surface, op, source));
     
-    if (surface->need_start_page) {
-	/* Optimize away erasing of nothing. */
-	if (op == CAIRO_OPERATOR_CLEAR)
-	    return CAIRO_STATUS_SUCCESS;
-	_cairo_ps_surface_start_page (surface);
-    }
-
     _cairo_output_stream_printf (stream,
 				 "%% _cairo_ps_surface_fill\n");
 
@@ -1763,18 +1750,17 @@ _cairo_ps_surface_show_glyphs (void		   
     cairo_ps_font_t *ps_font;
     cairo_ps_glyph_t *ps_glyph;
 
+    /* Optimize away erasing of nothing. */
+    if (surface->page_is_blank && op == CAIRO_OPERATOR_CLEAR)
+	return CAIRO_STATUS_SUCCESS;
+
+    surface->page_is_blank = FALSE;
+
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _analyze_operation (surface, op, source);
 
     assert (operation_supported (surface, op, source));
 
-    if (surface->need_start_page) {
-	/* Optimize away erasing of nothing. */
-	if (op == CAIRO_OPERATOR_CLEAR)
-	    return CAIRO_STATUS_SUCCESS;
-	_cairo_ps_surface_start_page (surface);
-    }
-
     _cairo_output_stream_printf (stream,
 				 "%% _cairo_ps_surface_show_glyphs\n");
     status = _cairo_ps_font_find (surface, scaled_font, &ps_font);
@@ -1828,6 +1814,7 @@ _cairo_ps_surface_set_paginated_mode (vo
     cairo_ps_surface_t *surface = abstract_surface;
 
     surface->paginated_mode = paginated_mode;
+    surface->page_is_blank = TRUE;
 }
 
 static const cairo_surface_backend_t cairo_ps_surface_backend = {
@@ -1865,5 +1852,6 @@ static const cairo_surface_backend_t cai
 };
 
 static const cairo_paginated_surface_backend_t cairo_ps_surface_paginated_backend = {
+    _cairo_ps_surface_start_page,
     _cairo_ps_surface_set_paginated_mode
 };
diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c
index 6190432..e4eb58a 100644
--- a/src/test-paginated-surface.c
+++ b/src/test-paginated-surface.c
@@ -279,5 +279,6 @@ static const cairo_surface_backend_t tes
 };
 
 static const cairo_paginated_surface_backend_t test_paginated_surface_paginated_backend = {
+    NULL, /* start_page */
     _test_paginated_surface_set_paginated_mode
 };
diff-tree 687802cca67ce4157725316d769fc28bc75f5dcd (from d284c2b5a475ff1672dad10e7bf76763877690a3)
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Apr 14 14:44:16 2006 -0700

    Obnoxious churn of gtk-doc templates.
    
    We really need to get these built files out from under version control, (or
    else abandon gtk-doc altogether).

diff --git a/doc/public/tmpl/cairo-svg.sgml b/doc/public/tmpl/cairo-svg.sgml
index 55dd625..31bf692 100644
--- a/doc/public/tmpl/cairo-svg.sgml
+++ b/doc/public/tmpl/cairo-svg.sgml
@@ -9,13 +9,11 @@ Rendering SVG documents
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### SECTION Stability_Level ##### -->
 
 


More information about the cairo-commit mailing list