summaryrefslogtreecommitdiff
path: root/src/pdf_bridge.h
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-14 22:38:50 -0300
committerGabriel Schneider <[email protected]>2026-08-15 11:58:29 -0300
commitbe2a9957708cbf0c478ca861c4a1f0f227bbfe10 (patch)
tree1abf5cb65057048ebfbce7fc427289a437a693f4 /src/pdf_bridge.h
parentf67fec978a9296c651ec06bd2f43686d34ff86ee (diff)
downloadpardes-be2a9957708cbf0c478ca861c4a1f0f227bbfe10.tar.gz
pardes-be2a9957708cbf0c478ca861c4a1f0f227bbfe10.zip
pdf: continuous scroll bench harness and per-frame render path
Diffstat (limited to 'src/pdf_bridge.h')
-rw-r--r--src/pdf_bridge.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pdf_bridge.h b/src/pdf_bridge.h
index 40eaa46c..a3d2de89 100644
--- a/src/pdf_bridge.h
+++ b/src/pdf_bridge.h
@@ -198,9 +198,15 @@ int pardes_pdf_measure_render(
);
/*
- * Rasterize directly into an exactly-sized caller-owned packed RGBA buffer.
+ * Rasterize one horizontal BAND of a page — rows [band_y, band_y+band_height)
+ * of the raster `pardes_pdf_measure_render` describes — directly into an
+ * exactly-sized caller-owned packed RGBA buffer, `stride * band_height` bytes.
+ * A full page is the band `(0, height)`.
+ *
* MuPDF wraps but never owns or frees samples. Every successful pixel is
* opaque, including the caller-supplied highlights composited onto the page.
+ * The CTM does not depend on the band, so a band's rows are bit-identical to
+ * the same rows of the whole page: it is a clip, not a different rendering.
*/
int pardes_pdf_render_into(
pardes_pdf_document *document,
@@ -215,7 +221,9 @@ int pardes_pdf_render_into(
size_t samples_len,
int width,
int height,
- int stride
+ int stride,
+ int band_y,
+ int band_height
);
int pardes_pdf_page_text(