[cairo-commit] src/cairo-ps-surface.c
Adrian Johnson
ajohnson at kemper.freedesktop.org
Tue Aug 21 15:44:06 PDT 2007
src/cairo-ps-surface.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
diff-tree 590717f03b4a396600734c4dac1dd0a9f140283c (from e66b2b68ab456d779524d9b4ab34acf5d38362b5)
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Wed Aug 22 07:58:14 2007 +0930
PS: Remove debug info from PS output
The debug code is now conditionally compiled.
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 676014c..211ecd1 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -49,6 +49,8 @@
#include <time.h>
#include <zlib.h>
+#define DEBUG_PS 0
+
static const cairo_surface_backend_t cairo_ps_surface_backend;
static const cairo_paginated_surface_backend_t cairo_ps_surface_paginated_backend;
@@ -379,8 +381,10 @@ _cairo_ps_surface_emit_type1_font_subset
/* FIXME: Figure out document structure convention for fonts */
+#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_type1_font_subset\n");
+#endif
length = subset.header_length + subset.data_length + subset.trailer_length;
_cairo_output_stream_write (surface->final_stream, subset.data, length);
@@ -408,8 +412,10 @@ _cairo_ps_surface_emit_type1_font_fallba
/* FIXME: Figure out document structure convention for fonts */
+#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_type1_font_fallback\n");
+#endif
length = subset.header_length + subset.data_length + subset.trailer_length;
_cairo_output_stream_write (surface->final_stream, subset.data, length);
@@ -435,8 +441,10 @@ _cairo_ps_surface_emit_truetype_font_sub
/* FIXME: Figure out document structure convention for fonts */
+#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_truetype_font_subset\n");
+#endif
_cairo_output_stream_printf (surface->final_stream,
"11 dict begin\n"
@@ -642,8 +650,10 @@ _cairo_ps_surface_emit_type3_font_subset
cairo_matrix_t matrix;
unsigned int i;
+#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_type3_font_subset\n");
+#endif
_cairo_output_stream_printf (surface->final_stream,
"/CairoFont-%d-%d <<\n",
@@ -724,8 +734,10 @@ _cairo_ps_surface_emit_font_subsets (cai
{
cairo_status_t status;
+#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_font_subsets\n");
+#endif
status = _cairo_scaled_font_subsets_foreach_unscaled (surface->font_subsets,
_cairo_ps_surface_emit_unscaled_font_subset,
@@ -1878,8 +1890,10 @@ _cairo_ps_surface_intersect_clip_path (v
if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
return CAIRO_STATUS_SUCCESS;
+#if DEBUG_PS
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_intersect_clip_path\n");
+#endif
if (path == NULL) {
_cairo_output_stream_printf (stream, "initclip\n");
@@ -1953,8 +1967,10 @@ _cairo_ps_surface_paint (void *abstrac
assert (_cairo_ps_surface_operation_supported (surface, op, source));
+#if DEBUG_PS
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_paint\n");
+#endif
status = _cairo_surface_get_extents (&surface->base, &extents);
if (status)
@@ -2041,8 +2057,10 @@ _cairo_ps_surface_stroke (void *abstra
assert (_cairo_ps_surface_operation_supported (surface, op, source));
+#if DEBUG_PS
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_stroke\n");
+#endif
/* PostScript has "special needs" when it comes to zero-length
* dash segments with butt caps. It apparently (at least
@@ -2171,8 +2189,10 @@ _cairo_ps_surface_fill (void *abstract_
assert (_cairo_ps_surface_operation_supported (surface, op, source));
+#if DEBUG_PS
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_fill\n");
+#endif
_cairo_ps_surface_emit_pattern (surface, source);
@@ -2229,8 +2249,10 @@ _cairo_ps_surface_show_glyphs (void
assert (_cairo_ps_surface_operation_supported (surface, op, source));
+#if DEBUG_PS
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_show_glyphs\n");
+#endif
if (num_glyphs <= 0)
return CAIRO_STATUS_SUCCESS;
More information about the cairo-commit
mailing list