pkgsrc-WIP-changes archive

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

zathura-pdf-mupdf: Always pass the cookie instead of NULL



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Sep 27 15:07:08 2018 +0200
Changeset:	09ef6cd6faa56b086d477ada9300e925e0f95359

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

Log Message:
zathura-pdf-mupdf: Always pass the cookie instead of NULL

(Still rendering issues though!)

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

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

diffstat:
 zathura-pdf-mupdf/distinfo                                 |  4 ++--
 zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c | 10 ++++++----
 zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c  | 13 +++++++++++--
 3 files changed, 19 insertions(+), 8 deletions(-)

diffs:
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
index 28a1320c66..8f04fe81fa 100644
--- a/zathura-pdf-mupdf/distinfo
+++ b/zathura-pdf-mupdf/distinfo
@@ -7,6 +7,6 @@ Size (zathura-pdf-mupdf-0.3.3.tar.xz) = 7880 bytes
 SHA1 (patch-document.c) = b7d3c8c23148f7eb5f034586c2da4995a5cf2b5d
 SHA1 (patch-meson.build) = a23f098b32e58019787a2b269c5cb73d5c219d07
 SHA1 (patch-zathura-pdf-mupdf_page.c) = 2c4ef79edaa7b0d1e4dce44e382e578ba21698be
-SHA1 (patch-zathura-pdf-mupdf_render.c) = a551478679d14906482673e60bd52cfd6cf74f7a
+SHA1 (patch-zathura-pdf-mupdf_render.c) = 8db8c49743a419a69bd33efe98114bc8878f91af
 SHA1 (patch-zathura-pdf-mupdf_search.c) = 9d21523e2768436fe2e00bc4765d21643d996c0c
-SHA1 (patch-zathura-pdf-mupdf_utils.c) = 92655c0684c72ca42954936f72795d85f4c3a318
+SHA1 (patch-zathura-pdf-mupdf_utils.c) = 8c1016d51a8b3be79d9398ad4588f0b93207efca
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
index 1590fdb1b0..e9b808b4a1 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
@@ -4,11 +4,13 @@ Port to mupdf-1.14.0
 
 --- zathura-pdf-mupdf/render.c.orig	2018-03-17 19:47:01.000000000 +0000
 +++ zathura-pdf-mupdf/render.c
-@@ -18,13 +18,16 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -18,13 +18,18 @@ pdf_page_render_to_buffer(mupdf_document
      return ZATHURA_ERROR_UNKNOWN;
    }
  
 -  fz_display_list* display_list = fz_new_display_list(mupdf_page->ctx, NULL);
++  fz_cookie cookie = { 0 };
++
 +  fz_irect irect = { .x1 = page_width, .y1 = page_height };
 +  fz_rect rect = { .x1 = page_width, .y1 = page_height };
 +
@@ -20,11 +22,11 @@ Port to mupdf-1.14.0
 -    fz_scale(&m, scalex, scaley);
 -    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, &m, NULL);
 +    m = fz_scale(scalex, scaley);
-+    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, m, NULL);
++    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, m, &cookie);
    } fz_catch (mupdf_document->ctx) {
      return ZATHURA_ERROR_UNKNOWN;
    }
-@@ -32,16 +35,13 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -32,16 +37,13 @@ pdf_page_render_to_buffer(mupdf_document
    fz_close_device(mupdf_page->ctx, device);
    fz_drop_device(mupdf_page->ctx, device);
  
@@ -40,7 +42,7 @@ Port to mupdf-1.14.0
 -  device = fz_new_draw_device(mupdf_page->ctx, NULL, pixmap);
 -  fz_run_display_list(mupdf_page->ctx, display_list, device, &fz_identity, &rect, NULL);
 +  device = fz_new_draw_device(mupdf_page->ctx, fz_identity, pixmap);
-+  fz_run_display_list(mupdf_page->ctx, display_list, device, fz_identity, rect, NULL);
++  fz_run_display_list(mupdf_page->ctx, display_list, device, fz_identity, rect, &cookie);
    fz_close_device(mupdf_page->ctx, device);
    fz_drop_device(mupdf_page->ctx, device);
  
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
index 03f7fb24fe..4c7e63e395 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
@@ -4,14 +4,23 @@ Port to mupdf-1.14.0
 
 --- zathura-pdf-mupdf/utils.c.orig	2018-03-17 19:47:01.000000000 +0000
 +++ zathura-pdf-mupdf/utils.c
-@@ -18,8 +18,8 @@ mupdf_page_extract_text(mupdf_document_t
+@@ -9,6 +9,8 @@ mupdf_page_extract_text(mupdf_document_t
+     return;
+   }
+ 
++  fz_cookie cookie = { 0 };
++
+   fz_device* volatile text_device = NULL;
+ 
+   fz_try (mupdf_page->ctx) {
+@@ -18,8 +20,8 @@ mupdf_page_extract_text(mupdf_document_t
      fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_DONT_INTERPOLATE_IMAGES);
  
      fz_matrix ctm;
 -    fz_scale(&ctm, 1.0, 1.0);
 -    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, &ctm, NULL);
 +    ctm = fz_scale(1.0, 1.0);
-+    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, ctm, NULL);
++    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, ctm, &cookie);
    } fz_always (mupdf_document->ctx) {
      fz_close_device(mupdf_page->ctx, text_device);
      fz_drop_device(mupdf_page->ctx, text_device);


Home | Main Index | Thread Index | Old Index