[cairo-commit] 2 commits - src/cairo-pdf-surface.c test/reference

Adrian Johnson ajohnson at kemper.freedesktop.org
Sat Sep 17 21:02:40 PDT 2011


 src/cairo-pdf-surface.c                |    6 ++++--
 test/reference/mask.pdf.argb32.ref.png |binary
 test/reference/mask.pdf.rgb24.ref.png  |binary
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b13c2270f5b7546453f81dd0e1ebdc7fb8e4b630
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Sep 18 13:30:12 2011 +0930

    test: refresh pdf mask ref images

diff --git a/test/reference/mask.pdf.argb32.ref.png b/test/reference/mask.pdf.argb32.ref.png
index 39d2d2b..33769ee 100644
Binary files a/test/reference/mask.pdf.argb32.ref.png and b/test/reference/mask.pdf.argb32.ref.png differ
diff --git a/test/reference/mask.pdf.rgb24.ref.png b/test/reference/mask.pdf.rgb24.ref.png
index abcdb1e..dbd49a8 100644
Binary files a/test/reference/mask.pdf.rgb24.ref.png and b/test/reference/mask.pdf.rgb24.ref.png differ
commit a01cc10fe16caf4fbadf9540c745dd58a75df38d
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Sep 18 13:19:57 2011 +0930

    pdf: ensure ink extents is not larger than bounded extents
    
    fixes mask test pdf output

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 16e4576..8da4f7b 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -6145,13 +6145,15 @@ _cairo_pdf_surface_mask (void			*abstract_surface,
     if (unlikely (status))
 	goto cleanup;
 
+    if (! _cairo_rectangle_intersect (&extents.bounded, &extents.source))
+	goto cleanup;
+
     status = _cairo_pattern_get_ink_extents (mask, &extents.mask);
     if (unlikely (status))
 	goto cleanup;
 
-    extents.bounded = extents.source;
     if (! _cairo_rectangle_intersect (&extents.bounded, &extents.mask))
-	return CAIRO_STATUS_SUCCESS;
+	goto cleanup;
 
     status = _cairo_pdf_surface_set_clip (surface, &extents);
     if (unlikely (status))


More information about the cairo-commit mailing list