pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zathura-pdf-mupdf-git: Add a patch to ignore separations



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Oct 4 02:42:08 2018 +0200
Changeset:	c93b45dd3f2ea9d8df7eff81356ef41ad0838e0e

Modified Files:
	zathura-pdf-mupdf-git/distinfo
Added Files:
	zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c

Log Message:
zathura-pdf-mupdf-git: Add a patch to ignore separations

This fixes problematic pages reported by upstream via issue #1 and
hence the big `XXX' comment!).

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c93b45dd3f2ea9d8df7eff81356ef41ad0838e0e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zathura-pdf-mupdf-git/distinfo                     |  1 +
 .../patches/patch-zathura-pdf-mupdf_render.c       | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diffs:
diff --git a/zathura-pdf-mupdf-git/distinfo b/zathura-pdf-mupdf-git/distinfo
index bf49cd5ed7..03354d1c8c 100644
--- a/zathura-pdf-mupdf-git/distinfo
+++ b/zathura-pdf-mupdf-git/distinfo
@@ -1,3 +1,4 @@
 $NetBSD$
 
 SHA1 (patch-document.c) = 680106636f8fb2ac57ff2a03496ed70b3516b26b
+SHA1 (patch-zathura-pdf-mupdf_render.c) = a758609ebd7993d7bbab8e2c0df8471ae3c0a724
diff --git a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c
new file mode 100644
index 0000000000..8de3b81f3e
--- /dev/null
+++ b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Ignore separations to fix issue #1 and issue #2.
+
+XXX: Why this happens and why this solve the problem?
+
+--- zathura-pdf-mupdf/render.c.orig	2018-10-04 00:21:14.161825172 +0000
++++ zathura-pdf-mupdf/render.c
+@@ -36,8 +36,7 @@ pdf_page_render_to_buffer(mupdf_document
+   fz_drop_device(mupdf_page->ctx, device);
+ 
+   fz_colorspace* colorspace = fz_device_bgr(mupdf_document->ctx);
+-  fz_separations* seps= fz_page_separations(mupdf_page->ctx, mupdf_page->page);
+-  fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, irect, seps, 1, image);
++  fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, irect, NULL, 1, image);
+   fz_clear_pixmap_with_value(mupdf_page->ctx, pixmap, 0xFF);
+ 
+   device = fz_new_draw_device(mupdf_page->ctx, fz_identity, pixmap);
+@@ -47,7 +46,6 @@ pdf_page_render_to_buffer(mupdf_document
+ 
+   fz_drop_pixmap(mupdf_page->ctx, pixmap);
+   fz_drop_display_list(mupdf_page->ctx, display_list);
+-  fz_drop_separations(mupdf_page->ctx, seps);
+ 
+   return ZATHURA_ERROR_OK;
+ }


Home | Main Index | Thread Index | Old Index