Skip to main content

Module texture

Module texture 

Source
Expand description

Text render-to-texture path (M-TEXT.5 / AUT-79).

Pairs FlexibleTextEngine (layout) and FlexibleTextRenderer (rasterization) with a FIFO-bounded cache keyed on (content, style, wrap_width, dimensions). Static text reuses the cached texture; any change to the inputs invalidates the entry.

The texture is a RenderTexture, so downstream callers can feed it into the same render path as masks (M-DYN.1) and dynamic textures — filter / mask / blend / export composition all become sprite-pipeline routing decisions (the M-TEXT.6 work).

Modeled on the mask_cache pattern in crate::render: same FIFO eviction at MAX_ENTRIES, same Arc-shared texture ownership, same (hits, misses) instrumentation hook.

Structs§

TextTextureCache
FIFO-bounded cache of rendered text textures.
TextTextureKey
Cache key for a rendered text texture.
TextTexturePipeline
High-level pipeline: text → RenderTexture, with caching.

Constants§

MAX_ENTRIES
Maximum number of cached text textures before FIFO eviction.