Bug 1774631 - Fix typo in cairo-pdf-surface.c that causes us to get spuriously-rasterized PDF output. r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Mon, 27 Jun 2022 15:11:27 +0000
changeset 622156 27ed4770342db4000f54c486faba210242385783
parent 622155 1ea7585d5378fa4f929266fcf894a0056550968f
child 622157 58e50984eacb0a9f70370fb70be1525e5b51529a
push id39908
push userimoraru@mozilla.com
push dateMon, 27 Jun 2022 21:50:36 +0000
treeherdermozilla-central@5563ec053750 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1774631
milestone103.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1774631 - Fix typo in cairo-pdf-surface.c that causes us to get spuriously-rasterized PDF output. r=jrmuizel There's a typo in the condition here, which results in returning CAIRO_INT_STATUS_UNSUPPORTED in cases where that shouldn't be necessary. Fixing this gets me nice vector PDF output. The bug is still present in upstream cairo trunk, so I'll report it there as well. Differential Revision: https://phabricator.services.mozilla.com/D150381
gfx/cairo/cairo/src/cairo-pdf-surface.c
--- a/gfx/cairo/cairo/src/cairo-pdf-surface.c
+++ b/gfx/cairo/cairo/src/cairo-pdf-surface.c
@@ -7555,17 +7555,17 @@ static cairo_int_status_t
 		    _cairo_box_from_rectangle (&box, extents);
 		    _cairo_matrix_transform_bounding_box_fixed (&pattern->matrix, &box, NULL);
 		    _cairo_box_round_to_rectangle (&box, &rect);
 
 		    /* Check if surface needs padding to fill extents */
 		    if (_cairo_surface_get_extents (surface_pattern->surface, &rec_extents)) {
 			if (_cairo_fixed_integer_ceil(box.p1.x) < rec_extents.x ||
 			    _cairo_fixed_integer_ceil(box.p1.y) < rec_extents.y ||
-			    _cairo_fixed_integer_floor(box.p2.y) > rec_extents.x + rec_extents.width ||
+			    _cairo_fixed_integer_floor(box.p2.x) > rec_extents.x + rec_extents.width ||
 			    _cairo_fixed_integer_floor(box.p2.y) > rec_extents.y + rec_extents.height)
 			{
 			    return CAIRO_INT_STATUS_UNSUPPORTED;
 			}
 		    }
 		}
 		return CAIRO_INT_STATUS_ANALYZE_RECORDING_SURFACE_PATTERN;
 	    }