THotPDF.RenderLoadedPageTilesParallel Method
Renders tiles from one loaded page on isolated workers whilst the calling thread delivers borrowed bitmaps in row-major order
Declaration
function RenderLoadedPageTilesParallel(PageIndex, DPI,
TileWidthPixels, TileHeightPixels, MaxConcurrency: Integer;
MaxWorkingBytes: Int64; Callback: THPDFRenderTileEvent): Integer; overload;
function RenderLoadedPageTilesParallel(PageIndex, DPI,
TileWidthPixels, TileHeightPixels, MaxConcurrency: Integer;
MaxWorkingBytes: Int64; Callback: THPDFRenderTileEvent;
out Info: THPDFParallelTileRenderInfo): Integer; overload;
Streaming and ownership
Callback runs serially on the calling thread and receives tiles in row-major order even though workers complete them in another order
Each bitmap is borrowed only for the callback invocation and is released immediately afterward, so copy or encode it inside the callback when it must survive
Set Cancel to stop new claims, wake workers, release unpublished bitmaps and return the number of delivered callbacks
The callback must not mutate or destroy the document whilst workers remain active
Memory and sharing
MaxWorkingBytes must be positive and reduces the worker count from the largest conservative tile reservation before work begins
Each worker retains at most one active or completed tile and the process-wide peak-memory scheduler can delay it further under competing document work
Parallel renderers share copied immutable Type 3 glyph token sequences and halftone threshold screens through the bounded RendererSharedCacheMaxBytes budget
THPDFParallelTileRenderInfo · Display Lists and Print Production