pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zathura-pdf-mupdf: Avoid to introduce cookie-s (NFCI)
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Sat Sep 29 17:58:57 2018 +0200
Changeset: ffbc3ee191ab9d52d9882fc00a1c236946d531fd
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: Avoid to introduce cookie-s (NFCI)
NULL still be passed (to reduce a bit the diff!).
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ffbc3ee191ab9d52d9882fc00a1c236946d531fd
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, 8 insertions(+), 19 deletions(-)
diffs:
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
index 06bd1cd5c5..278fd71d5f 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) = 1ec30e3d7605a3b7bf3bccad0a38784fdfdeef3a
SHA1 (patch-zathura-pdf-mupdf_page.c) = bfce420f9396025a23b7c8a78ff962b834d6746a
-SHA1 (patch-zathura-pdf-mupdf_render.c) = 8db8c49743a419a69bd33efe98114bc8878f91af
+SHA1 (patch-zathura-pdf-mupdf_render.c) = a551478679d14906482673e60bd52cfd6cf74f7a
SHA1 (patch-zathura-pdf-mupdf_search.c) = 9d21523e2768436fe2e00bc4765d21643d996c0c
-SHA1 (patch-zathura-pdf-mupdf_utils.c) = 8c1016d51a8b3be79d9398ad4588f0b93207efca
+SHA1 (patch-zathura-pdf-mupdf_utils.c) = 92655c0684c72ca42954936f72795d85f4c3a318
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 e9b808b4a1..1590fdb1b0 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
@@ -4,13 +4,11 @@ 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,18 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -18,13 +18,16 @@ 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 };
+
@@ -22,11 +20,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, &cookie);
++ fz_run_page(mupdf_document->ctx, mupdf_page->page, device, m, NULL);
} fz_catch (mupdf_document->ctx) {
return ZATHURA_ERROR_UNKNOWN;
}
-@@ -32,16 +37,13 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -32,16 +35,13 @@ pdf_page_render_to_buffer(mupdf_document
fz_close_device(mupdf_page->ctx, device);
fz_drop_device(mupdf_page->ctx, device);
@@ -42,7 +40,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, &cookie);
++ fz_run_display_list(mupdf_page->ctx, display_list, device, fz_identity, rect, NULL);
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 4c7e63e395..03f7fb24fe 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
@@ -4,23 +4,14 @@ 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
-@@ -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
+@@ -18,8 +18,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, &cookie);
++ fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, ctm, NULL);
} 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