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

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Jul 15 12:34:17 UTC 2016


 src/cairo-pdf-surface.c |    2 +-
 src/cairo-ps-surface.c  |   31 -------------------------------
 2 files changed, 1 insertion(+), 32 deletions(-)

New commits:
commit 1a380ef5f37339583b8ab7b964025445b4fbb215
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Jul 15 22:03:04 2016 +0930

    ps/pdf: remove debug and commented out code

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index afb1675..51a9514 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -417,7 +417,7 @@ _cairo_pdf_surface_create_for_stream_internal (cairo_output_stream_t	*output,
     }
 
     surface->pdf_version = CAIRO_PDF_VERSION_1_5;
-    surface->compress_content = 0;
+    surface->compress_content = TRUE;
     surface->pdf_stream.active = FALSE;
     surface->pdf_stream.old_output = NULL;
     surface->group_stream.active = FALSE;
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 7d0240d..240c8e2 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1758,7 +1758,6 @@ _cairo_ps_surface_acquire_source_surface_from_pattern (cairo_ps_surface_t
     switch (pattern->type) {
     case CAIRO_PATTERN_TYPE_SURFACE: {
 	cairo_box_t bbox;
-	//cairo_rectangle_int_t rect;
 	cairo_surface_t *surf = ((cairo_surface_pattern_t *) pattern)->surface;
 
 	if (surf->type == CAIRO_SURFACE_TYPE_RECORDING) {
@@ -1774,39 +1773,9 @@ _cairo_ps_surface_acquire_source_surface_from_pattern (cairo_ps_surface_t
 		*x_offset = -sub->extents.x;
 		*y_offset = -sub->extents.y;
 	    } else {
-		//cairo_recording_surface_t *recording_surface;
-
 		*src_surface_bounded = _cairo_surface_get_extents (surf, src_surface_extents);
-
-/*		recording_surface = (cairo_recording_surface_t *) surf;
-		status = _cairo_recording_surface_get_bbox (recording_surface, &bbox, NULL);
-		if (unlikely (status)) {
-		    cairo_surface_destroy (*image_extra);
-		    return status;
-		}
-
-		_cairo_box_round_to_rectangle (&bbox, src_extents);
-		*x_offset = src_extents->x;
-		*y_offset = src_extents->y; */
 	    }
 	    *source_surface = surf;
-
-//*	    if (pattern->extend == CAIRO_EXTEND_NONE || pattern->extend == CAIRO_EXTEND_PAD) {
-		/* Clip the source extents to the operation extents (transformed to pattern space) */
-/*		cairo_rectangle_int_t old_src_extents = *src_extents;
-
-		_cairo_box_from_rectangle (&bbox, extents);
-		_cairo_matrix_transform_bounding_box_fixed (&pattern->matrix, &bbox, NULL);
-		_cairo_box_round_to_rectangle (&bbox, &rect);
-		if (surf->backend->type == CAIRO_SURFACE_TYPE_SUBSURFACE) {
-		    rect.x += src_extents->x;
-		    rect.y += src_extents->y;
-		}
-		_cairo_rectangle_intersect (src_extents, &rect);
-		*x_offset += (src_extents->x - old_src_extents.x);
-		*y_offset += (src_extents->y - old_src_extents.y);
-	    }*/
-
 	    _cairo_box_from_rectangle (&bbox, extents);
 	    _cairo_matrix_transform_bounding_box_fixed (&pattern->matrix, &bbox, NULL);
 	    _cairo_box_round_to_rectangle (&bbox, src_op_extents);


More information about the cairo-commit mailing list