[cairo-commit] src/cairo-ps-surface.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Thu Nov 26 02:49:00 PST 2009


 src/cairo-ps-surface.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 4fc7bdaed651a5c19eb89dddd88808468e0e7eb8
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Nov 26 21:14:20 2009 +1030

    PS: Add some missing pdf-operators flushes

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 6785c12..fd3c73d 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -2702,6 +2702,10 @@ _cairo_ps_surface_paint_surface (cairo_ps_surface_t      *surface,
     int origin_x = 0;
     int origin_y = 0;
 
+    status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+    if (unlikely (status))
+	return status;
+
     status = _cairo_ps_surface_acquire_surface (surface,
 						pattern,
 						extents,
@@ -3331,6 +3335,10 @@ _cairo_ps_surface_emit_pattern (cairo_ps_surface_t *surface,
 {
     cairo_status_t status;
 
+    status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+    if (unlikely (status))
+	return status;
+
     if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) {
 	cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) pattern;
 
@@ -3456,6 +3464,10 @@ _cairo_ps_surface_paint (void			*abstract_surface,
 	(source->extend == CAIRO_EXTEND_NONE ||
 	 source->extend == CAIRO_EXTEND_PAD))
     {
+	status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+	if (unlikely (status))
+	    return status;
+
 	_cairo_output_stream_printf (stream, "q\n");
 	status = _cairo_ps_surface_paint_surface (surface,
 						 (cairo_surface_pattern_t *) source,
@@ -3677,10 +3689,13 @@ _cairo_ps_surface_set_paginated_mode (void			*abstract_surface,
 				      cairo_paginated_mode_t	 paginated_mode)
 {
     cairo_ps_surface_t *surface = abstract_surface;
+    cairo_status_t status;
 
     surface->paginated_mode = paginated_mode;
 
     if (surface->clipper.clip.path != NULL) {
+	status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+
 	_cairo_output_stream_printf (surface->stream, "Q\n");
 	_cairo_surface_clipper_reset (&surface->clipper);
     }


More information about the cairo-commit mailing list