From be2a9957708cbf0c478ca861c4a1f0f227bbfe10 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 14 Aug 2026 22:38:50 -0300 Subject: pdf: continuous scroll bench harness and per-frame render path --- src/pdf_bridge.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/pdf_bridge.h') 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( -- cgit v1.3